70
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
2 |
<html>
|
|
3 |
<head>
|
|
4 |
<title>Target Communication Framework Services - System Monitor</title>
|
|
5 |
</head>
|
|
6 |
|
|
7 |
<body lang='EN-US'>
|
|
8 |
|
|
9 |
<h1>Target Communication Framework Services - System Monitor</h1>
|
|
10 |
|
|
11 |
<ul>
|
|
12 |
<li><a href='#VersionHistory'>Version History</a>
|
|
13 |
<li><a href='#Overview'>Overview</a>
|
|
14 |
<li><a href='#Cmds'>Commands</a>
|
|
15 |
<ul>
|
|
16 |
<li><a href='#CmdGetContext'>Get Context</a>
|
|
17 |
<li><a href='#CmdGetChildren'>Get Children</a>
|
|
18 |
<li><a href='#CmdGetCommandLine'>Get Command Line</a>
|
|
19 |
<li><a href='#CmdGetEnvironment'>Get Environment</a>
|
|
20 |
</ul>
|
|
21 |
<li><a href='#Events'>Events</a>
|
|
22 |
<li><a href='#API'>API</a>
|
|
23 |
</ul>
|
|
24 |
|
|
25 |
<h1>System Monitor Service</h1>
|
|
26 |
|
|
27 |
<h2><a name='VersionHistory'>Version History</a></h2>
|
|
28 |
|
|
29 |
<table border=1 cellpadding=8>
|
|
30 |
<tr>
|
|
31 |
<th>Version
|
|
32 |
<th>Date
|
|
33 |
<th>Change
|
|
34 |
<tr>
|
|
35 |
<td>0.1
|
|
36 |
<td>2008-01-10
|
|
37 |
<td>Initial contribution
|
|
38 |
</table>
|
|
39 |
|
|
40 |
<h2><a name='Overview'>Overview</a></h2>
|
|
41 |
|
|
42 |
<p>The service can be used for monitoring system activity and utilization.
|
|
43 |
It provides list of running processes, different process attributes like command line, environment, etc.,
|
|
44 |
and some resource utilization data. The service can be used by a client to provide functionality
|
|
45 |
similar to Unix 'top' utility or Windows 'Task Manager'.</p>
|
|
46 |
|
|
47 |
<p>Command and event parameters are encoded
|
|
48 |
as zero terminated <a href='TCF Specification.html#JSON'>JSON</a> strings.</p>
|
|
49 |
|
|
50 |
<p>The service uses standard format for error reports,
|
|
51 |
see <a href='TCF Services.html#ErrorFormat'>Error Report Format</a>.</p>
|
|
52 |
|
|
53 |
<h2><a name='Cmds'>Commands</a></h2>
|
|
54 |
|
|
55 |
<h3><a name='CmdGetContext'>Get Context</a></h3>
|
|
56 |
|
|
57 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
58 |
C • <i><token></i> • SysMonitor • getContext • <i><string: context ID></i> •
|
|
59 |
</font></b></pre>
|
|
60 |
|
|
61 |
<p>The command retrieves context info for given context ID.
|
|
62 |
A context corresponds to an execution thread or process.
|
|
63 |
Context IDs are valid across TCF services, so it is allowed to issue 'SysMonitor.getContext'
|
|
64 |
command with a context that was obtained from another service.</p>
|
|
65 |
|
|
66 |
<p>Reply:</p>
|
|
67 |
|
|
68 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
69 |
R • <i><token></i> • <i><error report></i> • <i><context data></i> •
|
|
70 |
|
|
71 |
<i><context data></i>
|
|
72 |
⇒ null
|
|
73 |
⇒ <i><object></i>
|
|
74 |
</font></b></pre>
|
|
75 |
|
|
76 |
<p>Context data object should, at least, contain member
|
|
77 |
<b><font face="Courier New" size=2 color=#333399>"ID" : <i><string>.</i></font></b>
|
|
78 |
</p>
|
|
79 |
|
|
80 |
<p>Predefined context properties are:</p>
|
|
81 |
<ul>
|
|
82 |
<li><code><b><font face="Courier New" size=2 color=#333399>"ID" : <i><string></i></font></b></code>
|
|
83 |
- ID of the context, same as getContext command argument.
|
|
84 |
|
|
85 |
<li><code><b><font face="Courier New" size=2 color=#333399>"ParentID" : <i><string></i></font></b></code>
|
|
86 |
- parent context ID.
|
|
87 |
|
|
88 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CWD" : <i><string></i></font></b></code>
|
|
89 |
- current working directory of the process.
|
|
90 |
|
|
91 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Root" : <i><string></i></font></b></code>
|
|
92 |
- the process's root directory (as set by chroot).
|
|
93 |
|
|
94 |
<li><code><b><font face="Courier New" size=2 color=#333399>"UID" : <i><int></i></font></b></code>
|
|
95 |
- User ID of the process owner.
|
|
96 |
|
|
97 |
<li><code><b><font face="Courier New" size=2 color=#333399>"UGID" : <i><int></i></font></b></code>
|
|
98 |
- Group ID of the process owner.
|
|
99 |
|
|
100 |
<li><code><b><font face="Courier New" size=2 color=#333399>"UserName" : <i><string></i></font></b></code>
|
|
101 |
- user name of the process owner.
|
|
102 |
|
|
103 |
<li><code><b><font face="Courier New" size=2 color=#333399>"GroupName" : <i><string></i></font></b></code>
|
|
104 |
- group name of the process owner.
|
|
105 |
|
|
106 |
<li><code><b><font face="Courier New" size=2 color=#333399>"PID" : <i><int></i></font></b></code>
|
|
107 |
- system process ID.
|
|
108 |
|
|
109 |
<li><code><b><font face="Courier New" size=2 color=#333399>"File" : <i><string></i></font></b></code>
|
|
110 |
- executable file of the process.
|
|
111 |
|
|
112 |
<li><code><b><font face="Courier New" size=2 color=#333399>"State" : <i><string></i></font></b></code>
|
|
113 |
- one character from the string "RSDZTW" where R is running, S is
|
|
114 |
sleeping in an interruptible wait, D is waiting in uninterruptible
|
|
115 |
disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
|
|
116 |
is paging.
|
|
117 |
|
|
118 |
<li><code><b><font face="Courier New" size=2 color=#333399>"PPID" : <i><int></i></font></b></code>
|
|
119 |
- system ID of the parent process.
|
|
120 |
|
|
121 |
<li><code><b><font face="Courier New" size=2 color=#333399>"PGRP" : <i><int></i></font></b></code>
|
|
122 |
- the process group ID of the process.
|
|
123 |
|
|
124 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Session" : <i><int></i></font></b></code>
|
|
125 |
- the session ID of the process.
|
|
126 |
|
|
127 |
<li><code><b><font face="Courier New" size=2 color=#333399>"TTY" : <i><int></i></font></b></code>
|
|
128 |
- the tty the process uses.
|
|
129 |
|
|
130 |
<li><code><b><font face="Courier New" size=2 color=#333399>"TGID" : <i><int></i></font></b></code>
|
|
131 |
- the process group ID of the process which currently owns the tty that
|
|
132 |
the process is connected to.
|
|
133 |
|
|
134 |
<li><code><b><font face="Courier New" size=2 color=#333399>"TracerPID" : <i><int></i></font></b></code>
|
|
135 |
- ID of a process that has attached this process for tracing or debugging.
|
|
136 |
|
|
137 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Flags" : <i><int></i></font></b></code>
|
|
138 |
- the kernel flags word of the process. Details depend on the kernel.
|
|
139 |
|
|
140 |
<li><code><b><font face="Courier New" size=2 color=#333399>"MinFlt" : <i><int></i></font></b></code>
|
|
141 |
- the number of minor faults the process has made which have not
|
|
142 |
required loading a memory page from disk.
|
|
143 |
|
|
144 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CMinFlt" : <i><int></i></font></b></code>
|
|
145 |
- the number of minor faults that the process's waited-for children have made.
|
|
146 |
|
|
147 |
<li><code><b><font face="Courier New" size=2 color=#333399>"MajFlt" : <i><int></i></font></b></code>
|
|
148 |
- the number of major faults the process has made which have required
|
|
149 |
loading a memory page from disk.
|
|
150 |
|
|
151 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CMajFlt" : <i><int></i></font></b></code>
|
|
152 |
- the number of major faults that the process's waited-for children
|
|
153 |
have made.
|
|
154 |
|
|
155 |
<li><code><b><font face="Courier New" size=2 color=#333399>"UTime" : <i><int></i></font></b></code>
|
|
156 |
- the number of milliseconds that this process has been scheduled in user mode.
|
|
157 |
|
|
158 |
<li><code><b><font face="Courier New" size=2 color=#333399>"STime" : <i><int></i></font></b></code>
|
|
159 |
- the number of milliseconds that this process has been scheduled in kernel mode.
|
|
160 |
|
|
161 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CUTime" : <i><int></i></font></b></code>
|
|
162 |
- the number of jiffies that this process's waited-for children have
|
|
163 |
been scheduled in user mode.
|
|
164 |
|
|
165 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CSTime" : <i><int></i></font></b></code>
|
|
166 |
- the number of jiffies that this process's waited-for children have
|
|
167 |
been scheduled in user mode.
|
|
168 |
|
|
169 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Priority" : <i><int></i></font></b></code>
|
|
170 |
- the standard nice value.
|
|
171 |
|
|
172 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Nice" : <i><int></i></font></b></code>
|
|
173 |
- the nice value.
|
|
174 |
|
|
175 |
<li><code><b><font face="Courier New" size=2 color=#333399>"ITRealValue" : <i><int></i></font></b></code>
|
|
176 |
- the time in milliseconds before the next SIGALRM is sent to the process
|
|
177 |
due to an interval timer.
|
|
178 |
|
|
179 |
<li><code><b><font face="Courier New" size=2 color=#333399>"StartTime" : <i><int></i></font></b></code>
|
|
180 |
- the time in milliseconds the process started after system boot.
|
|
181 |
|
|
182 |
<li><code><b><font face="Courier New" size=2 color=#333399>"VSize" : <i><int></i></font></b></code>
|
|
183 |
- virtual memory size in bytes.
|
|
184 |
|
|
185 |
<li><code><b><font face="Courier New" size=2 color=#333399>"PSize" : <i><int></i></font></b></code>
|
|
186 |
- memory pages size in bytes.
|
|
187 |
|
|
188 |
<li><code><b><font face="Courier New" size=2 color=#333399>"RSS" : <i><int></i></font></b></code>
|
|
189 |
- resident Set Size: number of pages the process has in real memory,
|
|
190 |
minus used for administrative purposes. This is just the pages which
|
|
191 |
count towards text, data, or stack space. This does not include
|
|
192 |
pages which have not been demand-loaded in, or which are swapped out.
|
|
193 |
|
|
194 |
<li><code><b><font face="Courier New" size=2 color=#333399>"RLimit" : <i><int></i></font></b></code>
|
|
195 |
- current limit in bytes on the rss of the process.
|
|
196 |
|
|
197 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeStart" : <i><int></i></font></b></code>
|
|
198 |
- the address above which program text can run.
|
|
199 |
|
|
200 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CodeEnd" : <i><int></i></font></b></code>
|
|
201 |
- the address below which program text can run.
|
|
202 |
|
|
203 |
<li><code><b><font face="Courier New" size=2 color=#333399>"StackStart" : <i><int></i></font></b></code>
|
|
204 |
- the address of the start of the stack.
|
|
205 |
|
|
206 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Signals" : <i><int></i></font></b></code>
|
|
207 |
- the bitmap of pending signals.
|
|
208 |
|
|
209 |
<li><code><b><font face="Courier New" size=2 color=#333399>"SigBlock" : <i><int></i></font></b></code>
|
|
210 |
- the bitmap of blocked signals.
|
|
211 |
|
|
212 |
<li><code><b><font face="Courier New" size=2 color=#333399>"SigIgnore" : <i><int></i></font></b></code>
|
|
213 |
- the bitmap of ignored signals.
|
|
214 |
|
|
215 |
<li><code><b><font face="Courier New" size=2 color=#333399>"SigCatch" : <i><int></i></font></b></code>
|
|
216 |
- the bitmap of caught signals.
|
|
217 |
|
|
218 |
<li><code><b><font face="Courier New" size=2 color=#333399>"WChan" : <i><int></i></font></b></code>
|
|
219 |
- this is the "channel" in which the process is waiting. It is the
|
|
220 |
address of a system call, and can be looked up in a namelist if you
|
|
221 |
need a textual name.
|
|
222 |
|
|
223 |
<li><code><b><font face="Courier New" size=2 color=#333399>"NSwap" : <i><int></i></font></b></code>
|
|
224 |
- number of pages swapped.
|
|
225 |
|
|
226 |
<li><code><b><font face="Courier New" size=2 color=#333399>"CNSwap" : <i><int></i></font></b></code>
|
|
227 |
- cumulative NSwap for child processes.
|
|
228 |
|
|
229 |
<li><code><b><font face="Courier New" size=2 color=#333399>"ExitSignal" : <i><int></i></font></b></code>
|
|
230 |
- signal to be sent to parent when this process exits.
|
|
231 |
|
|
232 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Processor" : <i><int></i></font></b></code>
|
|
233 |
- CPU number last executed on.
|
|
234 |
|
|
235 |
<li><code><b><font face="Courier New" size=2 color=#333399>"RTPriority" : <i><int></i></font></b></code>
|
|
236 |
- real-time scheduling priority.
|
|
237 |
|
|
238 |
<li><code><b><font face="Courier New" size=2 color=#333399>"Policy" : <i><int></i></font></b></code>
|
|
239 |
- scheduling policy.
|
|
240 |
</ul>
|
|
241 |
|
|
242 |
<h3><a name='CmdGetChildren'>Get Children</a></h3>
|
|
243 |
|
|
244 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
245 |
C • <i><token></i> • SysMonitor • getChildren • <i><string: parent context ID></i> •
|
|
246 |
</font></b></pre>
|
|
247 |
|
|
248 |
<p>The command requests a list of contexts available for System Monitor commands.</p>
|
|
249 |
|
|
250 |
<p>Parent context ID can be null – to retrieve top level of the hierarchy, can be one
|
|
251 |
of context IDs retrieved by previous getChildren commands, or it can be obtained from another service.
|
|
252 |
Contexts hierarchy can be simple plain list or it can form a tree. It is up to target agent developers to
|
|
253 |
choose layout that is most descriptive for a given target.</p>
|
|
254 |
|
|
255 |
<p>Reply:</p>
|
|
256 |
|
|
257 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
258 |
R • <i><token></i> • <i><error report></i> • <i><array of context IDs></i> •
|
|
259 |
|
|
260 |
<i><array of context IDs></i>
|
|
261 |
⇒ null
|
|
262 |
⇒ [ ]
|
|
263 |
⇒ [ <i><context ID list></i> ]
|
|
264 |
|
|
265 |
<i><context ID list></i>
|
|
266 |
⇒ <i><string: context ID></i>
|
|
267 |
⇒ <i><context ID list></i> , <i><string: context ID></i>
|
|
268 |
</font></b></pre>
|
|
269 |
|
|
270 |
<h3><a name='CmdGetCommandLine'>Get Command Line</a></h3>
|
|
271 |
|
|
272 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
273 |
C • <i><token></i> • SysMonitor • getCommandLine • <i><string: context ID></i> •
|
|
274 |
</font></b></pre>
|
|
275 |
|
|
276 |
<p>The command requests a list of progess command line arguments.</p>
|
|
277 |
|
|
278 |
<p>Reply:</p>
|
|
279 |
|
|
280 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
281 |
R • <i><token></i> • <i><error report></i> • <i><array of string></i> •
|
|
282 |
|
|
283 |
<i><array of string></i>
|
|
284 |
⇒ null
|
|
285 |
⇒ [ ]
|
|
286 |
⇒ [ <i><string list></i> ]
|
|
287 |
|
|
288 |
<i><string list></i>
|
|
289 |
⇒ <i><string></i>
|
|
290 |
⇒ <i><string list></i> , <i><string></i>
|
|
291 |
</font></b></pre>
|
|
292 |
|
|
293 |
<h3><a name='CmdGetEnvironment'>Get Environment</a></h3>
|
|
294 |
|
|
295 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
296 |
C • <i><token></i> • SysMonitor • getEnvironment • <i><string: context ID></i> •
|
|
297 |
</font></b></pre>
|
|
298 |
|
|
299 |
<p>The command requests a list of progess environment variables.</p>
|
|
300 |
|
|
301 |
<p>Reply:</p>
|
|
302 |
|
|
303 |
<pre><b><font face="Courier New" size=2 color=#333399>
|
|
304 |
R • <i><token></i> • <i><error report></i> • <i><array of string></i> •
|
|
305 |
</font></b></pre>
|
|
306 |
|
|
307 |
<h2><a name='Events'>Events</a></h2>
|
|
308 |
|
|
309 |
<p>No events are currently defined for System Monitor service.</p>
|
|
310 |
|
|
311 |
<h2><a name='API'>API</a></h2>
|
|
312 |
|
|
313 |
<pre>
|
|
314 |
<font color=#7F0055>public interface</font> ISysMonitor <font color=#7F0055>extends</font> IService {
|
|
315 |
|
|
316 |
<font color=#7F0055>static final</font> String NAME = "SysMonitor";
|
|
317 |
|
|
318 |
<font color=#3F5FBF>/**
|
|
319 |
* Retrieve context info for given context ID.
|
|
320 |
*
|
|
321 |
* <font color=#7F9FBF>@param</font> id – context ID.
|
|
322 |
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
|
|
323 |
*/</font>
|
|
324 |
IToken getContext(String id, DoneGetContext done);
|
|
325 |
|
|
326 |
<font color=#3F5FBF>/**
|
|
327 |
* Client callback interface for getContext().
|
|
328 |
*/</font>
|
|
329 |
<font color=#7F0055>interface</font> DoneGetContext {
|
|
330 |
<font color=#3F5FBF>/**
|
|
331 |
* Called when contexts data retrieval is done.
|
|
332 |
* <font color=#7F9FBF>@param</font> error – error description if operation failed, null if succeeded.
|
|
333 |
* <font color=#7F9FBF>@param</font> context – context data.
|
|
334 |
*/</font>
|
|
335 |
<font color=#7F0055>void</font> doneGetContext(IToken token, Exception error, SysMonitorContext context);
|
|
336 |
}
|
|
337 |
|
|
338 |
<font color=#3F5FBF>/**
|
|
339 |
* Retrieve children of given context.
|
|
340 |
*
|
|
341 |
* <font color=#7F9FBF>@param</font> parent_context_id – parent context ID. Can be null –
|
|
342 |
* to retrieve top level of the hierarchy, or one of context IDs retrieved
|
|
343 |
* by previous getContext or getChildren commands.
|
|
344 |
* <font color=#7F9FBF>@param</font> done - callback interface called when operation is completed.
|
|
345 |
*/</font>
|
|
346 |
IToken getChildren(String parent_context_id, DoneGetChildren done);
|
|
347 |
|
|
348 |
<font color=#3F5FBF>/**
|
|
349 |
* Client callback interface for getChildren().
|
|
350 |
*/</font>
|
|
351 |
<font color=#7F0055>interface</font> DoneGetChildren {
|
|
352 |
<font color=#3F5FBF>/**
|
|
353 |
* Called when contexts data retrieval is done.
|
|
354 |
* <font color=#7F9FBF>@param</font> error – error description if operation failed, null if succeeded.
|
|
355 |
* <font color=#7F9FBF>@param</font> context_ids – array of available context IDs.
|
|
356 |
*/</font>
|
|
357 |
<font color=#7F0055>void</font> doneGetChildren(IToken token, Exception error, String[] context_ids);
|
|
358 |
}
|
|
359 |
|
|
360 |
<font color=#3F5FBF>/**
|
|
361 |
* Context property names.
|
|
362 |
*/</font>
|
|
363 |
<font color=#7F0055>static final</font> String
|
|
364 |
<font color=#3F5FBF>/** The TCF context ID */</font>
|
|
365 |
PROP_ID = "ID",
|
|
366 |
|
|
367 |
<font color=#3F5FBF>/** The TCF parent context ID */</font>
|
|
368 |
PROP_PARENTID = "ParentID",
|
|
369 |
|
|
370 |
<font color=#3F5FBF>/** Current working directory of the process */</font>
|
|
371 |
PROP_CWD = "CWD",
|
|
372 |
|
|
373 |
<font color=#3F5FBF>/** The process's root directory (as set by chroot) */</font>
|
|
374 |
PROP_ROOT = "Root",
|
|
375 |
|
|
376 |
<font color=#3F5FBF>/** User ID of the process owner */</font>
|
|
377 |
PROP_UID = "UID",
|
|
378 |
|
|
379 |
<font color=#3F5FBF>/** Group ID of the process owner */</font>
|
|
380 |
PROP_UGID = "UGID",
|
|
381 |
|
|
382 |
<font color=#3F5FBF>/** User name of the process owner */</font>
|
|
383 |
PROP_USERNAME = "UserName",
|
|
384 |
|
|
385 |
<font color=#3F5FBF>/** Group name of the process owner */</font>
|
|
386 |
PROP_GROUPNAME = "GroupName",
|
|
387 |
|
|
388 |
<font color=#3F5FBF>/** System process ID */</font>
|
|
389 |
PROP_PID = "PID",
|
|
390 |
|
|
391 |
<font color=#3F5FBF>/** Executable file of the process */</font>
|
|
392 |
PROP_FILE = "File",
|
|
393 |
|
|
394 |
<font color=#3F5FBF>/** One character from the string "RSDZTW" where R is running, S is
|
|
395 |
* sleeping in an interruptible wait, D is waiting in uninterruptible
|
|
396 |
* disk sleep, Z is zombie, T is traced or stopped (on a signal), and W
|
|
397 |
* is paging.*/</font>
|
|
398 |
PROP_STATE = "State",
|
|
399 |
|
|
400 |
<font color=#3F5FBF>/** System ID of the parent process */</font>
|
|
401 |
PROP_PPID = "PPID",
|
|
402 |
|
|
403 |
<font color=#3F5FBF>/** The process group ID of the process */</font>
|
|
404 |
PROP_PGRP = "PGRP",
|
|
405 |
|
|
406 |
<font color=#3F5FBF>/** The session ID of the process */</font>
|
|
407 |
PROP_SESSION = "Session",
|
|
408 |
|
|
409 |
<font color=#3F5FBF>/** The tty the process uses */</font>
|
|
410 |
PROP_TTY = "TTY",
|
|
411 |
|
|
412 |
<font color=#3F5FBF>/** The process group ID of the process which currently owns the tty that
|
|
413 |
* the process is connected to. */</font>
|
|
414 |
PROP_TGID = "TGID",
|
|
415 |
|
|
416 |
<font color=#3F5FBF>/** ID of a process that has attached this process for tracing or debugging */</font>
|
|
417 |
PROP_TRACERPID = "TracerPID",
|
|
418 |
|
|
419 |
<font color=#3F5FBF>/** The kernel flags word of the process. Details depend on the kernel */</font>
|
|
420 |
PROP_FLAGS = "Flags",
|
|
421 |
|
|
422 |
<font color=#3F5FBF>/** The number of minor faults the process has made which have not
|
|
423 |
* required loading a memory page from disk */</font>
|
|
424 |
PROP_MINFLT = "MinFlt",
|
|
425 |
|
|
426 |
<font color=#3F5FBF>/** The number of minor faults that the process's waited-for children have made */</font>
|
|
427 |
PROP_CMINFLT = "CMinFlt",
|
|
428 |
|
|
429 |
<font color=#3F5FBF>/** The number of major faults the process has made which have required
|
|
430 |
* loading a memory page from disk */</font>
|
|
431 |
PROP_MAJFLT = "MajFlt",
|
|
432 |
|
|
433 |
<font color=#3F5FBF>/** The number of major faults that the process's waited-for children
|
|
434 |
* have made */</font>
|
|
435 |
PROP_CMAJFLT = "CMajFlt",
|
|
436 |
|
|
437 |
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in user mode */</font>
|
|
438 |
PROP_UTIME = "UTime",
|
|
439 |
|
|
440 |
<font color=#3F5FBF>/** The number of milliseconds that this process has been scheduled in kernel mode */</font>
|
|
441 |
PROP_STIME = "STime",
|
|
442 |
|
|
443 |
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
|
|
444 |
* been scheduled in user mode */</font>
|
|
445 |
PROP_CUTIME = "CUTime",
|
|
446 |
|
|
447 |
<font color=#3F5FBF>/** The number of jiffies that this process's waited-for children have
|
|
448 |
* been scheduled in user mode */</font>
|
|
449 |
PROP_CSTIME = "CSTime",
|
|
450 |
|
|
451 |
<font color=#3F5FBF>/** The standard nice value */</font>
|
|
452 |
PROP_PRIORITY = "Priority",
|
|
453 |
|
|
454 |
<font color=#3F5FBF>/** The nice value */</font>
|
|
455 |
PROP_NICE = "Nice",
|
|
456 |
|
|
457 |
<font color=#3F5FBF>/** The time in milliseconds before the next SIGALRM is sent to the process
|
|
458 |
* due to an interval timer */</font>
|
|
459 |
PROP_ITREALVALUE = "ITRealValue",
|
|
460 |
|
|
461 |
<font color=#3F5FBF>/** The time in milliseconds the process started after system boot */</font>
|
|
462 |
PROP_STARTTIME = "StartTime",
|
|
463 |
|
|
464 |
<font color=#3F5FBF>/** Virtual memory size in bytes */</font>
|
|
465 |
PROP_VSIZE = "VSize",
|
|
466 |
|
|
467 |
<font color=#3F5FBF>/** Memory pages size in bytes */</font>
|
|
468 |
PROP_PSIZE = "PSize",
|
|
469 |
|
|
470 |
<font color=#3F5FBF>/** Resident Set Size: number of pages the process has in real memory,
|
|
471 |
* minus used for administrative purposes. This is just the pages which
|
|
472 |
* count towards text, data, or stack space. This does not include
|
|
473 |
* pages which have not been demand-loaded in, or which are swapped out */</font>
|
|
474 |
PROP_RSS = "RSS",
|
|
475 |
|
|
476 |
<font color=#3F5FBF>/** Current limit in bytes on the rss of the process */</font>
|
|
477 |
PROP_RLIMIT = "RLimit",
|
|
478 |
|
|
479 |
<font color=#3F5FBF>/** The address above which program text can run */</font>
|
|
480 |
PROP_CODESTART = "CodeStart",
|
|
481 |
|
|
482 |
<font color=#3F5FBF>/** The address below which program text can run */</font>
|
|
483 |
PROP_CODEEND = "CodeEnd",
|
|
484 |
|
|
485 |
<font color=#3F5FBF>/** The address of the start of the stack */</font>
|
|
486 |
PROP_STACKSTART = "StackStart",
|
|
487 |
|
|
488 |
<font color=#3F5FBF>/** The bitmap of pending signals */</font>
|
|
489 |
PROP_SIGNALS = "Signals",
|
|
490 |
|
|
491 |
<font color=#3F5FBF>/** The bitmap of blocked signals */</font>
|
|
492 |
PROP_SIGBLOCK = "SigBlock",
|
|
493 |
|
|
494 |
<font color=#3F5FBF>/** The bitmap of ignored signals */</font>
|
|
495 |
PROP_SIGIGNORE = "SigIgnore",
|
|
496 |
|
|
497 |
<font color=#3F5FBF>/** The bitmap of caught signals */</font>
|
|
498 |
PROP_SIGCATCH = "SigCatch",
|
|
499 |
|
|
500 |
<font color=#3F5FBF>/** This is the "channel" in which the process is waiting. It is the
|
|
501 |
* address of a system call, and can be looked up in a name list if you
|
|
502 |
* need a textual name */</font>
|
|
503 |
PROP_WCHAN = "WChan",
|
|
504 |
|
|
505 |
<font color=#3F5FBF>/** Number of pages swapped */</font>
|
|
506 |
PROP_NSWAP = "NSwap",
|
|
507 |
|
|
508 |
<font color=#3F5FBF>/** Cumulative NSwap for child processes */</font>
|
|
509 |
PROP_CNSWAP = "CNSwap",
|
|
510 |
|
|
511 |
<font color=#3F5FBF>/** Signal to be sent to parent when this process exits */</font>
|
|
512 |
PROP_EXITSIGNAL = "ExitSignal",
|
|
513 |
|
|
514 |
<font color=#3F5FBF>/** CPU number last executed on */</font>
|
|
515 |
PROP_PROCESSOR = "Processor",
|
|
516 |
|
|
517 |
<font color=#3F5FBF>/** Real-time scheduling priority */</font>
|
|
518 |
PROP_RTPRIORITY = "RTPriority",
|
|
519 |
|
|
520 |
<font color=#3F5FBF>/** Scheduling policy */</font>
|
|
521 |
PROP_POLICY = "Policy";
|
|
522 |
|
|
523 |
|
|
524 |
<font color=#3F5FBF>/**
|
|
525 |
* A context corresponds to an execution thread, process, address space, etc.
|
|
526 |
* A context can belong to a parent context. Contexts hierarchy can be simple
|
|
527 |
* plain list or it can form a tree. It is up to target agent developers to choose
|
|
528 |
* layout that is most descriptive for a given target. Context IDs are valid across
|
|
529 |
* all services. In other words, all services access same hierarchy of contexts,
|
|
530 |
* with same IDs, however, each service accesses its own subset of context's
|
|
531 |
* attributes and functionality, which is relevant to that service.
|
|
532 |
*/</font>
|
|
533 |
<font color=#7F0055>interface</font> SysMonitorContext {
|
|
534 |
|
|
535 |
<font color=#3F5FBF>/**
|
|
536 |
* Get context ID.
|
|
537 |
* Same as getProperties().get(“ID”)
|
|
538 |
*/</font>
|
|
539 |
String getID();
|
|
540 |
|
|
541 |
<font color=#3F5FBF>/**
|
|
542 |
* Get parent context ID.
|
|
543 |
* Same as getProperties().get(“ParentID”)
|
|
544 |
*/</font>
|
|
545 |
String getParentID();
|
|
546 |
|
|
547 |
<font color=#3F5FBF>/**
|
|
548 |
* Get process group ID.
|
|
549 |
* Same as getProperties().get(“PGRP”)
|
|
550 |
*/</font>
|
|
551 |
<font color=#7F0055>long</font> getPGRP();
|
|
552 |
|
|
553 |
<font color=#3F5FBF>/**
|
|
554 |
* Get process ID.
|
|
555 |
* Same as getProperties().get(“PID”)
|
|
556 |
*/</font>
|
|
557 |
<font color=#7F0055>long</font> getPID();
|
|
558 |
|
|
559 |
<font color=#3F5FBF>/**
|
|
560 |
* Get process parent ID.
|
|
561 |
* Same as getProperties().get(“PPID”)
|
|
562 |
*/</font>
|
|
563 |
<font color=#7F0055>long</font> getPPID();
|
|
564 |
|
|
565 |
<font color=#3F5FBF>/**
|
|
566 |
* Get process TTY group ID.
|
|
567 |
* Same as getProperties().get(“TGID”)
|
|
568 |
*/</font>
|
|
569 |
<font color=#7F0055>long</font> getTGID();
|
|
570 |
|
|
571 |
<font color=#3F5FBF>/**
|
|
572 |
* Get tracer process ID.
|
|
573 |
* Same as getProperties().get(“TracerPID”)
|
|
574 |
*/</font>
|
|
575 |
<font color=#7F0055>long</font> getTracerPID();
|
|
576 |
|
|
577 |
<font color=#3F5FBF>/**
|
|
578 |
* Get process owner user ID.
|
|
579 |
* Same as getProperties().get(“UID”)
|
|
580 |
*/</font>
|
|
581 |
<font color=#7F0055>long</font> getUID();
|
|
582 |
|
|
583 |
<font color=#3F5FBF>/**
|
|
584 |
* Get process owner user name.
|
|
585 |
* Same as getProperties().get(“UserName”)
|
|
586 |
*/</font>
|
|
587 |
String getUserName();
|
|
588 |
|
|
589 |
<font color=#3F5FBF>/**
|
|
590 |
* Get process owner user group ID.
|
|
591 |
* Same as getProperties().get(“UGID”)
|
|
592 |
*/</font>
|
|
593 |
<font color=#7F0055>long</font> getUGID();
|
|
594 |
|
|
595 |
<font color=#3F5FBF>/**
|
|
596 |
* Get process owner user group name.
|
|
597 |
* Same as getProperties().get(“GroupName”)
|
|
598 |
*/</font>
|
|
599 |
String getGroupName();
|
|
600 |
|
|
601 |
<font color=#3F5FBF>/**
|
|
602 |
* Get process state.
|
|
603 |
* Same as getProperties().get(“State”)
|
|
604 |
*/</font>
|
|
605 |
String getState();
|
|
606 |
|
|
607 |
<font color=#3F5FBF>/**
|
|
608 |
* Get process virtual memory size in bytes.
|
|
609 |
* Same as getProperties().get(“VSize”)
|
|
610 |
*/</font>
|
|
611 |
<font color=#7F0055>long</font> getVSize();
|
|
612 |
|
|
613 |
<font color=#3F5FBF>/**
|
|
614 |
* Get process virtual memory page size in bytes.
|
|
615 |
* Same as getProperties().get(“PSize”)
|
|
616 |
*/</font>
|
|
617 |
<font color=#7F0055>long</font> getPSize();
|
|
618 |
|
|
619 |
<font color=#3F5FBF>/**
|
|
620 |
* Get number of memory pages in process resident set.
|
|
621 |
* Same as getProperties().get(“RSS”)
|
|
622 |
*/</font>
|
|
623 |
<font color=#7F0055>long</font> getRSS();
|
|
624 |
|
|
625 |
<font color=#3F5FBF>/**
|
|
626 |
* Get context executable file.
|
|
627 |
* Same as getProperties().get(“File”)
|
|
628 |
*/</font>
|
|
629 |
String getFile();
|
|
630 |
|
|
631 |
<font color=#3F5FBF>/**
|
|
632 |
* Get context current file system root.
|
|
633 |
* Same as getProperties().get(“Root”)
|
|
634 |
*/</font>
|
|
635 |
String getRoot();
|
|
636 |
|
|
637 |
<font color=#3F5FBF>/**
|
|
638 |
* Get context current working directory.
|
|
639 |
* Same as getProperties().get(“CWD”)
|
|
640 |
*/</font>
|
|
641 |
String getCurrentWorkingDirectory();
|
|
642 |
|
|
643 |
<font color=#3F5FBF>/**
|
|
644 |
* Get all available context properties.
|
|
645 |
* @return Map 'property name' -> 'property value'
|
|
646 |
*/</font>
|
|
647 |
Map<String,Object> getProperties();
|
|
648 |
}
|
|
649 |
|
|
650 |
<font color=#3F5FBF>/**
|
|
651 |
* Get context command line.
|
|
652 |
*/</font>
|
|
653 |
IToken getCommandLine(String id, DoneGetCommandLine done);
|
|
654 |
|
|
655 |
<font color=#7F0055>interface</font> DoneGetCommandLine {
|
|
656 |
<font color=#7F0055>void</font> doneGetCommandLine(IToken token, Exception error, String[] cmd_line);
|
|
657 |
}
|
|
658 |
|
|
659 |
<font color=#3F5FBF>/**
|
|
660 |
* Get context environment variables.
|
|
661 |
*/</font>
|
|
662 |
IToken getEnvironment(String id, DoneGetEnvironment done);
|
|
663 |
|
|
664 |
<font color=#7F0055>interface</font> DoneGetEnvironment {
|
|
665 |
<font color=#7F0055>void</font> doneGetEnvironment(IToken token, Exception error, String[] environment);
|
|
666 |
}
|
|
667 |
}
|
|
668 |
</pre>
|
|
669 |
|
|
670 |
</body>
|
|
671 |
</html>
|