| 1 |
tdb |
1.1 |
<?xml version="1.0"?> |
| 2 |
|
|
|
| 3 |
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
| 4 |
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
| 5 |
|
|
|
| 6 |
|
|
<refentry id="get_process_stats"> |
| 7 |
|
|
|
| 8 |
|
|
<refentryinfo> |
| 9 |
|
|
<date>$Date$</date> |
| 10 |
|
|
<releaseinfo>$Id$</releaseinfo> |
| 11 |
|
|
</refentryinfo> |
| 12 |
|
|
|
| 13 |
|
|
<refmeta> |
| 14 |
|
|
<refentrytitle>get_process_stats</refentrytitle> |
| 15 |
|
|
<manvolnum>3</manvolnum> |
| 16 |
|
|
<refmiscinfo>i-scream</refmiscinfo> |
| 17 |
|
|
</refmeta> |
| 18 |
|
|
|
| 19 |
|
|
<refnamediv> |
| 20 |
|
|
<refname>get_process_stats</refname> |
| 21 |
|
|
<refpurpose>get process statistics</refpurpose> |
| 22 |
|
|
</refnamediv> |
| 23 |
|
|
|
| 24 |
|
|
<refsynopsisdiv> |
| 25 |
|
|
<funcsynopsis> |
| 26 |
|
|
<funcsynopsisinfo>#include <statgrab.h></funcsynopsisinfo> |
| 27 |
|
|
<funcprototype> |
| 28 |
|
|
<funcdef>process_stat_t *<function>get_process_stats</function></funcdef> |
| 29 |
|
|
<void/> |
| 30 |
|
|
</funcprototype> |
| 31 |
|
|
</funcsynopsis> |
| 32 |
|
|
</refsynopsisdiv> |
| 33 |
|
|
|
| 34 |
|
|
<refsect1> |
| 35 |
|
|
<title>Description</title> |
| 36 |
|
|
<para> |
| 37 |
|
|
<function>get_process_stats</function> returns a pointer to a |
| 38 |
|
|
static buffer of type <structname>process_stat_t</structname>. |
| 39 |
|
|
</para> |
| 40 |
|
|
<para> |
| 41 |
|
|
It provides information on the number of processes and the |
| 42 |
|
|
system and the different states they're in. |
| 43 |
|
|
</para> |
| 44 |
|
|
</refsect1> |
| 45 |
|
|
|
| 46 |
|
|
<refsect1> |
| 47 |
|
|
<title>Return Values</title> |
| 48 |
|
|
|
| 49 |
|
|
<para> |
| 50 |
|
|
The structure returned is of type |
| 51 |
|
|
<structname>process_stat_t</structname>. |
| 52 |
|
|
</para> |
| 53 |
|
|
|
| 54 |
|
|
<programlisting> |
| 55 |
|
|
typedef struct{ |
| 56 |
|
|
int total; |
| 57 |
|
|
int running; |
| 58 |
|
|
int sleeping; |
| 59 |
|
|
int stopped; |
| 60 |
|
|
int zombie; |
| 61 |
|
|
}process_stat_t; |
| 62 |
|
|
</programlisting> |
| 63 |
|
|
|
| 64 |
|
|
<variablelist> |
| 65 |
|
|
<varlistentry> |
| 66 |
|
|
<term><structfield>total</structfield></term> |
| 67 |
|
|
<listitem> |
| 68 |
|
|
<para> |
| 69 |
|
|
The total number of processes. |
| 70 |
|
|
</para> |
| 71 |
|
|
</listitem> |
| 72 |
|
|
</varlistentry> |
| 73 |
|
|
<varlistentry> |
| 74 |
|
|
<term><structfield>running</structfield></term> |
| 75 |
|
|
<listitem> |
| 76 |
|
|
<para> |
| 77 |
|
|
The number of running processes. |
| 78 |
|
|
</para> |
| 79 |
|
|
</listitem> |
| 80 |
|
|
</varlistentry> |
| 81 |
|
|
<varlistentry> |
| 82 |
|
|
<term><structfield>sleeping</structfield></term> |
| 83 |
|
|
<listitem> |
| 84 |
|
|
<para> |
| 85 |
|
|
The number of sleeping processes. |
| 86 |
|
|
</para> |
| 87 |
|
|
</listitem> |
| 88 |
|
|
</varlistentry> |
| 89 |
|
|
<varlistentry> |
| 90 |
|
|
<term><structfield>stopped</structfield></term> |
| 91 |
|
|
<listitem> |
| 92 |
|
|
<para> |
| 93 |
|
|
The number of stopped processes. |
| 94 |
|
|
</para> |
| 95 |
|
|
</listitem> |
| 96 |
|
|
</varlistentry> |
| 97 |
|
|
<varlistentry> |
| 98 |
|
|
<term><structfield>zombie</structfield></term> |
| 99 |
|
|
<listitem> |
| 100 |
|
|
<para> |
| 101 |
|
|
The number of zombie processes. |
| 102 |
|
|
</para> |
| 103 |
|
|
</listitem> |
| 104 |
|
|
</varlistentry> |
| 105 |
|
|
</variablelist> |
| 106 |
|
|
</refsect1> |
| 107 |
|
|
|
| 108 |
|
|
<refsect1> |
| 109 |
|
|
<title>See Also</title> |
| 110 |
|
|
<para>Nothing yet</para> |
| 111 |
|
|
</refsect1> |
| 112 |
|
|
|
| 113 |
|
|
<refsect1> |
| 114 |
|
|
<title>Website</title> |
| 115 |
|
|
|
| 116 |
|
|
<simplelist type="vert"> |
| 117 |
|
|
<member> |
| 118 |
|
|
<ulink url="http://www.i-scream.org">http://www.i-scream.org</ulink> |
| 119 |
|
|
</member> |
| 120 |
|
|
</simplelist> |
| 121 |
|
|
</refsect1> |
| 122 |
|
|
|
| 123 |
|
|
</refentry> |