| 1 |
get_process_stats returns information on the number of processes on |
| 2 |
the host, and the number in different states. It takes no arguments. |
| 3 |
|
| 4 |
get_process_stats returns a static buffer process_stat_t |
| 5 |
|
| 6 |
process_stat_t *get_process_stats(); |
| 7 |
|
| 8 |
typedef struct{ |
| 9 |
int total; |
| 10 |
int running; |
| 11 |
int sleeping; |
| 12 |
int stopped; |
| 13 |
int zombie; |
| 14 |
}process_stat_t; |
| 15 |
|
| 16 |
total : stores the total number of processes on the machine |
| 17 |
running : the number of running processes |
| 18 |
sleeping : number of sleeping processes |
| 19 |
stopped : number of stopped processes |
| 20 |
zombie : number of zombie processes |
| 21 |
|
| 22 |
see examples/process_stats.c for a working implimentation. |