1 |
/* |
2 |
* i-scream libstatgrab |
3 |
* http://www.i-scream.org |
4 |
* Copyright (C) 2000-2004 i-scream |
5 |
* |
6 |
* This library is free software; you can redistribute it and/or |
7 |
* modify it under the terms of the GNU Lesser General Public |
8 |
* License as published by the Free Software Foundation; either |
9 |
* version 2.1 of the License, or (at your option) any later version. |
10 |
* |
11 |
* This library is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 |
* Lesser General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU Lesser General Public |
17 |
* License along with this library; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
19 |
* 02111-1307 USA |
20 |
* |
21 |
* $Id$ |
22 |
*/ |
23 |
|
24 |
#include <sys/types.h> |
25 |
|
26 |
int statgrab_init(void); |
27 |
int statgrab_drop_privileges(void); |
28 |
|
29 |
typedef sg_host_info general_stat_t; |
30 |
|
31 |
general_stat_t *get_general_stats(); |
32 |
|
33 |
typedef sg_cpu_stats cpu_states_t; |
34 |
|
35 |
cpu_states_t *get_cpu_totals(); |
36 |
cpu_states_t *get_cpu_diff(); |
37 |
|
38 |
typedef sg_cpu_percents cpu_percent_t; |
39 |
|
40 |
cpu_percent_t *cpu_percent_usage(); |
41 |
|
42 |
typedef sg_mem_stats mem_stat_t; |
43 |
|
44 |
mem_stat_t *get_memory_stats(); |
45 |
|
46 |
typedef sg_load_stats load_stat_t; |
47 |
|
48 |
load_stat_t *get_load_stats(); |
49 |
|
50 |
typedef sg_user_stats user_stat_t; |
51 |
|
52 |
user_stat_t *get_user_stats(); |
53 |
|
54 |
typedef sg_swap_stats swap_stat_t; |
55 |
|
56 |
swap_stat_t *get_swap_stats(); |
57 |
|
58 |
typedef sg_fs_stats disk_stat_t; |
59 |
|
60 |
disk_stat_t *get_disk_stats(int *entries); |
61 |
|
62 |
typedef sg_disk_io_stats diskio_stat_t; |
63 |
|
64 |
diskio_stat_t *get_diskio_stats(int *entries); |
65 |
diskio_stat_t *get_diskio_stats_diff(int *entries); |
66 |
|
67 |
typedef sg_network_io_stats network_stat_t; |
68 |
|
69 |
network_stat_t *get_network_stats(int *entries); |
70 |
network_stat_t *get_network_stats_diff(int *entries); |
71 |
|
72 |
/* Changed in statgrab.h 1.33 */ |
73 |
typedef enum{ |
74 |
FULL_DUPLEX, |
75 |
HALF_DUPLEX, |
76 |
UNKNOWN_DUPLEX |
77 |
}statgrab_duplex; |
78 |
|
79 |
typedef sg_network_iface_stats network_iface_stat_t; |
80 |
|
81 |
network_iface_stat_t *get_network_iface_stats(int *entries); |
82 |
|
83 |
typedef sg_page_stats page_stat_t; |
84 |
|
85 |
page_stat_t *get_page_stats(); |
86 |
page_stat_t *get_page_stats_diff(); |
87 |
|
88 |
typedef sg_process_count process_stat_t; |
89 |
|
90 |
process_stat_t *get_process_stats(); |
91 |
|