| 26 |
|
<funcsynopsisinfo>#include <statgrab.h></funcsynopsisinfo> |
| 27 |
|
|
| 28 |
|
<funcprototype> |
| 29 |
+ |
<funcdef>int <function>statgrab_init</function></funcdef> |
| 30 |
+ |
<void/> |
| 31 |
+ |
</funcprototype> |
| 32 |
+ |
|
| 33 |
+ |
<funcprototype> |
| 34 |
|
<funcdef>cpu_percent_t *<function>cpu_percent_usage</function></funcdef> |
| 35 |
|
<void/> |
| 36 |
|
</funcprototype> |
| 109 |
|
system statistics. Each of the function calls returns a structure |
| 110 |
|
containing statistics. See the manual page for each individual |
| 111 |
|
function for more details on usage. |
| 112 |
+ |
</para> |
| 113 |
+ |
<para> |
| 114 |
+ |
<function>statgrab_init(void)</function> should be the first |
| 115 |
+ |
function you call before you start to use libstatgrab. This |
| 116 |
+ |
function on *bsd systems opens up the kernel structures and |
| 117 |
+ |
leaves them open for future use. Because of this, any special |
| 118 |
+ |
privileges the program has (e.g. setgid kmem) can be dropped |
| 119 |
+ |
after this call, and all the libstatgrab calls should continue to |
| 120 |
+ |
work. |
| 121 |
+ |
</para> |
| 122 |
+ |
<para> |
| 123 |
+ |
<function>statgrab_init</function> returns 0 on success, and |
| 124 |
+ |
non-zero on failure. |
| 125 |
|
</para> |
| 126 |
|
<para> |
| 127 |
|
The library was originally written to support the i-scream central |