31 |
|
/* FIXME comments for less obvious fields */ |
32 |
|
|
33 |
|
int sg_init(void); |
34 |
+ |
int sg_snapshot(); |
35 |
+ |
int sg_shutdown(); |
36 |
|
int sg_drop_privileges(void); |
37 |
|
|
38 |
|
typedef enum { |
39 |
|
SG_ERROR_NONE = 0, |
40 |
|
SG_ERROR_ASPRINTF, |
41 |
+ |
SG_ERROR_DEVICES, |
42 |
|
SG_ERROR_DEVSTAT_GETDEVS, |
43 |
|
SG_ERROR_DEVSTAT_SELECTDEVS, |
44 |
+ |
SG_ERROR_DISKINFO, |
45 |
|
SG_ERROR_ENOENT, |
46 |
|
SG_ERROR_GETIFADDRS, |
47 |
|
SG_ERROR_GETMNTINFO, |
48 |
|
SG_ERROR_GETPAGESIZE, |
49 |
+ |
SG_ERROR_HOST, |
50 |
|
SG_ERROR_KSTAT_DATA_LOOKUP, |
51 |
|
SG_ERROR_KSTAT_LOOKUP, |
52 |
|
SG_ERROR_KSTAT_OPEN, |
54 |
|
SG_ERROR_KVM_GETSWAPINFO, |
55 |
|
SG_ERROR_KVM_OPENFILES, |
56 |
|
SG_ERROR_MALLOC, |
57 |
+ |
SG_ERROR_MEMSTATUS, |
58 |
|
SG_ERROR_OPEN, |
59 |
|
SG_ERROR_OPENDIR, |
60 |
|
SG_ERROR_PARSE, |
61 |
+ |
SG_ERROR_PDHADD, |
62 |
+ |
SG_ERROR_PDHCOLLECT, |
63 |
+ |
SG_ERROR_PDHOPEN, |
64 |
+ |
SG_ERROR_PDHREAD, |
65 |
+ |
SG_ERROR_PERMISSION, |
66 |
+ |
SG_ERROR_PSTAT, |
67 |
|
SG_ERROR_SETEGID, |
68 |
|
SG_ERROR_SETEUID, |
69 |
|
SG_ERROR_SETMNTENT, |
164 |
|
long long total_inodes; |
165 |
|
long long used_inodes; |
166 |
|
long long free_inodes; |
167 |
+ |
long long avail_inodes; |
168 |
+ |
long long io_size; |
169 |
+ |
long long block_size; |
170 |
+ |
long long total_blocks; |
171 |
+ |
long long free_blocks; |
172 |
+ |
long long used_blocks; |
173 |
+ |
long long avail_blocks; |
174 |
|
} sg_fs_stats; |
175 |
|
|
176 |
|
sg_fs_stats *sg_get_fs_stats(int *entries); |
216 |
|
typedef struct { |
217 |
|
char *interface_name; |
218 |
|
int speed; /* In megabits/sec */ |
219 |
+ |
sg_iface_duplex duplex; |
220 |
+ |
#ifdef SG_ENABLE_DEPRECATED |
221 |
|
sg_iface_duplex dup; |
222 |
+ |
#endif |
223 |
|
int up; |
224 |
|
} sg_network_iface_stats; |
225 |
|
|
252 |
|
pid_t parent; /* Parent pid */ |
253 |
|
pid_t pgid; /* process id of process group leader */ |
254 |
|
|
255 |
+ |
/* Windows does not have uid_t or gid_t types */ |
256 |
+ |
#ifndef WIN32 |
257 |
|
uid_t uid; |
258 |
|
uid_t euid; |
259 |
|
gid_t gid; |
260 |
|
gid_t egid; |
261 |
+ |
#else |
262 |
+ |
int uid; |
263 |
+ |
int euid; |
264 |
+ |
int gid; |
265 |
+ |
int egid; |
266 |
+ |
#endif |
267 |
|
|
268 |
|
unsigned long long proc_size; /* in bytes */ |
269 |
|
unsigned long long proc_resident; /* in bytes */ |