| 1 |
Process Statistics |
| 2 |
================== |
| 3 |
|
| 4 |
$Id$ |
| 5 |
|
| 6 |
Data Structure |
| 7 |
-------------- |
| 8 |
|
| 9 |
The function returns a structure of type process_stat_t that looks |
| 10 |
like this: |
| 11 |
|
| 12 |
typedef struct{ |
| 13 |
int total; |
| 14 |
int running; |
| 15 |
int sleeping; |
| 16 |
int stopped; |
| 17 |
int zombie; |
| 18 |
}process_stat_t; |
| 19 |
|
| 20 |
total is the total number of processes |
| 21 |
running is the number of running processes |
| 22 |
sleeping is the number of sleeping processes |
| 23 |
stopped is the number of stopped processes |
| 24 |
zombie is the number of zombie processes |
| 25 |
|
| 26 |
Functions |
| 27 |
--------- |
| 28 |
|
| 29 |
process_stat_t *get_process_stats(); |
| 30 |
|
| 31 |
get_process_stats returns a static buffer process_stat_t. |
| 32 |
|
| 33 |
It returns information on the number of processes on the system and |
| 34 |
the different states they're in. |
| 35 |
|
| 36 |
Examples |
| 37 |
-------- |
| 38 |
|
| 39 |
See examples/process_stats.c for a working implementation. |