1 |
|
/* |
2 |
|
* i-scream central monitoring system |
3 |
< |
* http://www.i-scream.org.uk |
4 |
< |
* Copyright (C) 2000-2002 i-scream |
3 |
> |
* http://www.i-scream.org |
4 |
> |
* Copyright (C) 2000-2003 i-scream |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or |
7 |
|
* modify it under the terms of the GNU General Public License |
21 |
|
#include <sys/types.h> |
22 |
|
|
23 |
|
typedef struct{ |
24 |
< |
uint_t user; |
25 |
< |
uint_t kernel; |
26 |
< |
uint_t idle; |
27 |
< |
uint_t iowait; |
28 |
< |
uint_t swap; |
29 |
< |
uint_t nice; |
30 |
< |
uint_t total; |
24 |
> |
long long user; |
25 |
> |
long long kernel; |
26 |
> |
long long idle; |
27 |
> |
long long iowait; |
28 |
> |
long long swap; |
29 |
> |
long long nice; |
30 |
> |
long long total; |
31 |
|
time_t systime; |
32 |
|
}cpu_states_t; |
33 |
|
|
57 |
|
#ifdef SOLARIS |
58 |
|
#define MAX_LOGIN_NAME_SIZE 8 |
59 |
|
#endif |
60 |
+ |
#if defined(LINUX) || defined(FREEBSD) |
61 |
+ |
#define MAX_LOGIN_NAME_SIZE UT_NAMESIZE |
62 |
+ |
#endif |
63 |
|
|
64 |
|
typedef struct{ |
65 |
|
char *name_list; |
116 |
|
}network_stat_t; |
117 |
|
|
118 |
|
typedef struct{ |
116 |
– |
long long num_pagein; |
117 |
– |
long long num_pageout; |
119 |
|
long long pages_pagein; |
120 |
|
long long pages_pageout; |
121 |
|
time_t systime; |
146 |
|
|
147 |
|
page_stat_t *get_page_stats(); |
148 |
|
page_stat_t *get_page_stats_diff(); |
149 |
+ |
|
150 |
+ |
int statgrab_init(void); |