ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/docs/process_stats.txt
Revision: 1.3
Committed: Sun Aug 24 20:24:08 2003 UTC (21 years, 2 months ago) by tdb
Content type: text/plain
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5_1, LIBSTATGRAB_0_5
Changes since 1.2: +27 -10 lines
Log Message:
Tidy up of lots of little things. :)

File Contents

# User Rev Content
1 tdb 1.3 Process Statistics
2     ==================
3 pajs 1.1
4 tdb 1.3 $Id$
5 pajs 1.1
6 tdb 1.3 Data Structure
7     --------------
8    
9     The function returns a structure of type process_stat_t that looks
10     like this:
11 pajs 1.1
12     typedef struct{
13     int total;
14     int running;
15     int sleeping;
16     int stopped;
17     int zombie;
18     }process_stat_t;
19    
20 tdb 1.3 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 pajs 1.1
39 tdb 1.3 See examples/process_stats.c for a working implementation.