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. |
1 |
> |
Process Statistics |
2 |
> |
================== |
3 |
|
|
4 |
< |
get_process_stats returns a static buffer process_stat_t |
4 |
> |
$Id$ |
5 |
|
|
6 |
< |
process_stat_t *get_process_stats(); |
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; |
17 |
|
int zombie; |
18 |
|
}process_stat_t; |
19 |
|
|
20 |
< |
total : stores the total number of processes on the machine |
21 |
< |
running : the number of running processes |
22 |
< |
sleeping : number of sleeping processes |
23 |
< |
stopped : number of stopped processes |
24 |
< |
zombie : number of zombie processes |
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 |
< |
see examples/process_stats.c for a working implimentation. |
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. |