1 |
tdb |
1.2 |
Load Averages |
2 |
|
|
============= |
3 |
pajs |
1.1 |
|
4 |
tdb |
1.2 |
$Id$ |
5 |
pajs |
1.1 |
|
6 |
tdb |
1.2 |
Data Structure |
7 |
|
|
-------------- |
8 |
|
|
|
9 |
|
|
The structure returned is of type load_stat_t and looks like this: |
10 |
pajs |
1.1 |
|
11 |
|
|
typedef struct{ |
12 |
|
|
double min1; |
13 |
|
|
double min5; |
14 |
|
|
double min15; |
15 |
|
|
}load_stat_t; |
16 |
|
|
|
17 |
tdb |
1.2 |
min1 The load average over 1 minute. |
18 |
|
|
min5 The load average over 5 minutes. |
19 |
|
|
min15 The load average over 15 minutes. |
20 |
|
|
|
21 |
|
|
Functions |
22 |
|
|
--------- |
23 |
|
|
|
24 |
|
|
load_stat_t *get_load_stats(); |
25 |
|
|
|
26 |
|
|
This call returns a static buffer of load_stat_t. |
27 |
|
|
|
28 |
|
|
On most systems this function is just a wrapper to the getloadavg |
29 |
|
|
system call. |
30 |
|
|
|
31 |
|
|
Example |
32 |
|
|
------- |
33 |
|
|
|
34 |
|
|
An example can be found in examples/load_stats.c |