~noskcaj/ubuntu/utopic/libgtop2/2.30

« back to all changes in this revision

Viewing changes to doc/reference/html/libgtop-Process-List.html

  • Committer: Jackson Doak
  • Date: 2014-06-30 07:31:40 UTC
  • mfrom: (1.1.22)
  • Revision ID: noskcaj@ubuntu.com-20140630073140-hinz7l89jkua5q4u
* New upstream release.
* Drop 06_kfreebsd_sys_pipe.patch. Fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>Libgtop Reference Manual: Process List</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
 
7
<link rel="home" href="index.html" title="Libgtop Reference Manual">
 
8
<link rel="up" href="libgtop-lib.html" title="Libgtop Library Reference">
 
9
<link rel="prev" href="libgtop-version.html" title="version">
 
10
<link rel="next" href="libgtop-sem-limits.html" title="sem_limits">
 
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
 
16
<td width="100%" align="left" class="shortcuts">
 
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
 
18
                  <a href="#libgtop-Process-List.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
 
19
                  <a href="#libgtop-Process-List.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 
20
</td>
 
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 
22
<td><a accesskey="u" href="libgtop-lib.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 
23
<td><a accesskey="p" href="libgtop-version.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 
24
<td><a accesskey="n" href="libgtop-sem-limits.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 
25
</tr></table>
 
26
<div class="refentry">
 
27
<a name="libgtop-Process-List"></a><div class="titlepage"></div>
 
28
<div class="refnamediv"><table width="100%"><tr>
 
29
<td valign="top">
 
30
<h2><span class="refentrytitle"><a name="libgtop-Process-List.top_of_page"></a>Process List</span></h2>
 
31
<p>Process List — List running processes</p>
 
32
</td>
 
33
<td class="gallery_image" valign="top" align="right"></td>
 
34
</tr></table></div>
 
35
<div class="refsect1">
 
36
<a name="libgtop-Process-List.stability-level"></a><h2>Stability Level</h2>
 
37
Stable, unless otherwise indicated
 
38
</div>
 
39
<div class="refsect1">
 
40
<a name="libgtop-Process-List.functions"></a><h2>Functions</h2>
 
41
<div class="informaltable"><table width="100%" border="0">
 
42
<colgroup>
 
43
<col width="150px" class="functions_return">
 
44
<col class="functions_name">
 
45
</colgroup>
 
46
<tbody><tr>
 
47
<td class="function_type">
 
48
<span class="returnvalue">pid_t</span> *
 
49
</td>
 
50
<td class="function_name">
 
51
<a class="link" href="libgtop-Process-List.html#glibtop-get-proclist" title="glibtop_get_proclist ()">glibtop_get_proclist</a> <span class="c_punctuation">()</span>
 
52
</td>
 
53
</tr></tbody>
 
54
</table></div>
 
55
</div>
 
56
<div class="refsect1">
 
57
<a name="libgtop-Process-List.other"></a><h2>Types and Values</h2>
 
58
<div class="informaltable"><table width="100%" border="0">
 
59
<colgroup>
 
60
<col width="150px" class="name">
 
61
<col class="description">
 
62
</colgroup>
 
63
<tbody>
 
64
<tr>
 
65
<td class="define_keyword">#define</td>
 
66
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-ALL:CAPS" title="GLIBTOP_KERN_PROC_ALL">GLIBTOP_KERN_PROC_ALL</a></td>
 
67
</tr>
 
68
<tr>
 
69
<td class="define_keyword">#define</td>
 
70
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-PID:CAPS" title="GLIBTOP_KERN_PROC_PID">GLIBTOP_KERN_PROC_PID</a></td>
 
71
</tr>
 
72
<tr>
 
73
<td class="define_keyword">#define</td>
 
74
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-PGRP:CAPS" title="GLIBTOP_KERN_PROC_PGRP">GLIBTOP_KERN_PROC_PGRP</a></td>
 
75
</tr>
 
76
<tr>
 
77
<td class="define_keyword">#define</td>
 
78
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-SESSION:CAPS" title="GLIBTOP_KERN_PROC_SESSION">GLIBTOP_KERN_PROC_SESSION</a></td>
 
79
</tr>
 
80
<tr>
 
81
<td class="define_keyword">#define</td>
 
82
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-TTY:CAPS" title="GLIBTOP_KERN_PROC_TTY">GLIBTOP_KERN_PROC_TTY</a></td>
 
83
</tr>
 
84
<tr>
 
85
<td class="define_keyword">#define</td>
 
86
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-UID:CAPS" title="GLIBTOP_KERN_PROC_UID">GLIBTOP_KERN_PROC_UID</a></td>
 
87
</tr>
 
88
<tr>
 
89
<td class="define_keyword">#define</td>
 
90
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-RUID:CAPS" title="GLIBTOP_KERN_PROC_RUID">GLIBTOP_KERN_PROC_RUID</a></td>
 
91
</tr>
 
92
<tr>
 
93
<td class="define_keyword">#define</td>
 
94
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-KERN-PROC-MASK:CAPS" title="GLIBTOP_KERN_PROC_MASK">GLIBTOP_KERN_PROC_MASK</a></td>
 
95
</tr>
 
96
<tr>
 
97
<td class="define_keyword">#define</td>
 
98
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-EXCLUDE-IDLE:CAPS" title="GLIBTOP_EXCLUDE_IDLE">GLIBTOP_EXCLUDE_IDLE</a></td>
 
99
</tr>
 
100
<tr>
 
101
<td class="define_keyword">#define</td>
 
102
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-EXCLUDE-SYSTEM:CAPS" title="GLIBTOP_EXCLUDE_SYSTEM">GLIBTOP_EXCLUDE_SYSTEM</a></td>
 
103
</tr>
 
104
<tr>
 
105
<td class="define_keyword">#define</td>
 
106
<td class="function_name"><a class="link" href="libgtop-Process-List.html#GLIBTOP-EXCLUDE-NOTTY:CAPS" title="GLIBTOP_EXCLUDE_NOTTY">GLIBTOP_EXCLUDE_NOTTY</a></td>
 
107
</tr>
 
108
<tr>
 
109
<td class="datatype_keyword">struct</td>
 
110
<td class="function_name"><a class="link" href="libgtop-Process-List.html#glibtop-proclist" title="struct glibtop_proclist">glibtop_proclist</a></td>
 
111
</tr>
 
112
</tbody>
 
113
</table></div>
 
114
</div>
 
115
<div class="refsect1">
 
116
<a name="libgtop-Process-List.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
117
<pre class="screen">
 
118
</pre>
 
119
</div>
 
120
<div class="refsect1">
 
121
<a name="libgtop-Process-List.includes"></a><h2>Includes</h2>
 
122
<pre class="synopsis">#include &lt;glibtop/proclist.h&gt;
 
123
</pre>
 
124
</div>
 
125
<div class="refsect1">
 
126
<a name="libgtop-Process-List.description"></a><h2>Description</h2>
 
127
</div>
 
128
<div class="refsect1">
 
129
<a name="libgtop-Process-List.functions_details"></a><h2>Functions</h2>
 
130
<div class="refsect2">
 
131
<a name="glibtop-get-proclist"></a><h3>glibtop_get_proclist ()</h3>
 
132
<pre class="programlisting"><span class="returnvalue">pid_t</span> *
 
133
glibtop_get_proclist (<em class="parameter"><code><a class="link" href="libgtop-Process-List.html#glibtop-proclist" title="struct glibtop_proclist"><span class="type">glibtop_proclist</span></a> *buf</code></em>,
 
134
                      <em class="parameter"><code><span class="type">gint64</span> which</code></em>,
 
135
                      <em class="parameter"><code><span class="type">gint64</span> arg</code></em>);</pre>
 
136
<div class="refsect3">
 
137
<a name="id-1.3.28.9.2.4"></a><h4>Parameters</h4>
 
138
<div class="informaltable"><table width="100%" border="0">
 
139
<colgroup>
 
140
<col width="150px" class="parameters_name">
 
141
<col class="parameters_description">
 
142
<col width="200px" class="parameters_annotations">
 
143
</colgroup>
 
144
<tbody>
 
145
<tr>
 
146
<td class="parameter_name"><p>buf</p></td>
 
147
<td class="parameter_description"><p>Extra return information, see <a class="link" href="libgtop-Process-List.html#glibtop-proclist" title="struct glibtop_proclist"><span class="type">glibtop_proclist</span></a>.</p></td>
 
148
<td class="parameter_annotations"> </td>
 
149
</tr>
 
150
<tr>
 
151
<td class="parameter_name"><p>which</p></td>
 
152
<td class="parameter_description"><p>Criteria for processes in returned list.  See the <span class="type">GLIBTOP_KERN_PROC_*</span> and <span class="type">GLIBTOP_EXCLUDE_*</span> constants.</p></td>
 
153
<td class="parameter_annotations"> </td>
 
154
</tr>
 
155
<tr>
 
156
<td class="parameter_name"><p>arg</p></td>
 
157
<td class="parameter_description"><p>Extra arguments applied to <em class="parameter"><code>which</code></em>
 
158
.  Only <span class="type">GLIBTOP_KERN_PROC_*</span> constants take arguments, see each constant definition for particular <em class="parameter"><code>arg</code></em>
 
159
description.</p></td>
 
160
<td class="parameter_annotations"> </td>
 
161
</tr>
 
162
</tbody>
 
163
</table></div>
 
164
</div>
 
165
<div class="refsect3">
 
166
<a name="id-1.3.28.9.2.5"></a><h4>Returns</h4>
 
167
<p> A list of running processes or <span class="type">NULL</span> on error.  The
 
168
returned list is allocated using <code class="function">g_malloc</code> and must be
 
169
freed using <code class="function">g_free</code> to avoid a memory leak.</p>
 
170
<p></p>
 
171
</div>
 
172
</div>
 
173
</div>
 
174
<div class="refsect1">
 
175
<a name="libgtop-Process-List.other_details"></a><h2>Types and Values</h2>
 
176
<div class="refsect2">
 
177
<a name="GLIBTOP-KERN-PROC-ALL:CAPS"></a><h3>GLIBTOP_KERN_PROC_ALL</h3>
 
178
<pre class="programlisting">#define GLIBTOP_KERN_PROC_ALL               0
 
179
</pre>
 
180
<p>Return information about all processes</p>
 
181
</div>
 
182
<hr>
 
183
<div class="refsect2">
 
184
<a name="GLIBTOP-KERN-PROC-PID:CAPS"></a><h3>GLIBTOP_KERN_PROC_PID</h3>
 
185
<pre class="programlisting">#define GLIBTOP_KERN_PROC_PID               1
 
186
</pre>
 
187
<p>Return all processes with the pid which is passed in <em class="parameter"><code>arg</code></em>
 
188
. You can use this to find out whether some process still exists.</p>
 
189
</div>
 
190
<hr>
 
191
<div class="refsect2">
 
192
<a name="GLIBTOP-KERN-PROC-PGRP:CAPS"></a><h3>GLIBTOP_KERN_PROC_PGRP</h3>
 
193
<pre class="programlisting">#define GLIBTOP_KERN_PROC_PGRP              2
 
194
</pre>
 
195
<p>Return all processes in the process group passed in <em class="parameter"><code>arg</code></em>
 
196
.</p>
 
197
</div>
 
198
<hr>
 
199
<div class="refsect2">
 
200
<a name="GLIBTOP-KERN-PROC-SESSION:CAPS"></a><h3>GLIBTOP_KERN_PROC_SESSION</h3>
 
201
<pre class="programlisting">#define GLIBTOP_KERN_PROC_SESSION 3
 
202
</pre>
 
203
<p>Return all processes in the session passed in <em class="parameter"><code>arg</code></em>
 
204
.</p>
 
205
</div>
 
206
<hr>
 
207
<div class="refsect2">
 
208
<a name="GLIBTOP-KERN-PROC-TTY:CAPS"></a><h3>GLIBTOP_KERN_PROC_TTY</h3>
 
209
<pre class="programlisting">#define GLIBTOP_KERN_PROC_TTY               4
 
210
</pre>
 
211
<p>Return all processes which have the controlling tty passed in <em class="parameter"><code>arg</code></em>
 
212
 
 
213
(which is interpreted as the device number).</p>
 
214
</div>
 
215
<hr>
 
216
<div class="refsect2">
 
217
<a name="GLIBTOP-KERN-PROC-UID:CAPS"></a><h3>GLIBTOP_KERN_PROC_UID</h3>
 
218
<pre class="programlisting">#define GLIBTOP_KERN_PROC_UID               5
 
219
</pre>
 
220
<p>Return all processes with the effective uid passed in <em class="parameter"><code>arg</code></em>
 
221
.</p>
 
222
</div>
 
223
<hr>
 
224
<div class="refsect2">
 
225
<a name="GLIBTOP-KERN-PROC-RUID:CAPS"></a><h3>GLIBTOP_KERN_PROC_RUID</h3>
 
226
<pre class="programlisting">#define GLIBTOP_KERN_PROC_RUID              6
 
227
</pre>
 
228
<p>Return all processes with the real uid passed in <em class="parameter"><code>arg</code></em>
 
229
.</p>
 
230
</div>
 
231
<hr>
 
232
<div class="refsect2">
 
233
<a name="GLIBTOP-KERN-PROC-MASK:CAPS"></a><h3>GLIBTOP_KERN_PROC_MASK</h3>
 
234
<pre class="programlisting">#define GLIBTOP_KERN_PROC_MASK              15
 
235
</pre>
 
236
<p>
 
237
</p>
 
238
</div>
 
239
<hr>
 
240
<div class="refsect2">
 
241
<a name="GLIBTOP-EXCLUDE-IDLE:CAPS"></a><h3>GLIBTOP_EXCLUDE_IDLE</h3>
 
242
<pre class="programlisting">#define GLIBTOP_EXCLUDE_IDLE                0x1000
 
243
</pre>
 
244
<p>Exclude idle processes.</p>
 
245
</div>
 
246
<hr>
 
247
<div class="refsect2">
 
248
<a name="GLIBTOP-EXCLUDE-SYSTEM:CAPS"></a><h3>GLIBTOP_EXCLUDE_SYSTEM</h3>
 
249
<pre class="programlisting">#define GLIBTOP_EXCLUDE_SYSTEM              0x2000
 
250
</pre>
 
251
<p>Exclude system (on most UNIXes root's) processes.</p>
 
252
</div>
 
253
<hr>
 
254
<div class="refsect2">
 
255
<a name="GLIBTOP-EXCLUDE-NOTTY:CAPS"></a><h3>GLIBTOP_EXCLUDE_NOTTY</h3>
 
256
<pre class="programlisting">#define GLIBTOP_EXCLUDE_NOTTY               0x4000
 
257
</pre>
 
258
<p>Exclude processes without a controlling terminal.</p>
 
259
</div>
 
260
<hr>
 
261
<div class="refsect2">
 
262
<a name="glibtop-proclist"></a><h3>struct glibtop_proclist</h3>
 
263
<pre class="programlisting">struct glibtop_proclist {
 
264
        guint64 flags;
 
265
        guint64 number;                 /* GLIBTOP_PROCLIST_NUMBER */
 
266
        guint64 total;                  /* GLIBTOP_PROCLIST_TOTAL */
 
267
        guint64 size;                   /* GLIBTOP_PROCLIST_SIZE */
 
268
};
 
269
</pre>
 
270
<div class="refsect3">
 
271
<a name="id-1.3.28.10.13.4"></a><h4>Members</h4>
 
272
<div class="informaltable"><table width="100%" border="0">
 
273
<colgroup>
 
274
<col width="300px" class="struct_members_name">
 
275
<col class="struct_members_description">
 
276
<col width="200px" class="struct_members_annotations">
 
277
</colgroup>
 
278
<tbody>
 
279
<tr>
 
280
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="glibtop-proclist.flags"></a>flags</code></em>;</p></td>
 
281
<td class="struct_member_description"> </td>
 
282
<td class="struct_member_annotations"> </td>
 
283
</tr>
 
284
<tr>
 
285
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="glibtop-proclist.number"></a>number</code></em>;</p></td>
 
286
<td class="struct_member_description"><p>Number of entries in the returned list.</p></td>
 
287
<td class="struct_member_annotations"> </td>
 
288
</tr>
 
289
<tr>
 
290
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="glibtop-proclist.total"></a>total</code></em>;</p></td>
 
291
<td class="struct_member_description"><p>Total size of the returned list (this equals <em class="parameter"><code>number</code></em>
 
292
* <em class="parameter"><code>size</code></em>
 
293
).</p></td>
 
294
<td class="struct_member_annotations"> </td>
 
295
</tr>
 
296
<tr>
 
297
<td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="glibtop-proclist.size"></a>size</code></em>;</p></td>
 
298
<td class="struct_member_description"><p>Size of a single entry in the returned list
 
299
(this equals <span class="type">sizeof(unsigned)</span>).</p></td>
 
300
<td class="struct_member_annotations"> </td>
 
301
</tr>
 
302
</tbody>
 
303
</table></div>
 
304
</div>
 
305
</div>
 
306
</div>
 
307
</div>
 
308
<div class="footer">
 
309
<hr>
 
310
          Generated by GTK-Doc V1.20</div>
 
311
</body>
 
312
</html>
 
 
b'\\ No newline at end of file'