| 21 |
|
* $Id$ |
| 22 |
|
*/ |
| 23 |
|
|
| 24 |
+ |
#ifndef STATGRAB_H |
| 25 |
+ |
#define STATGRAB_H |
| 26 |
+ |
|
| 27 |
|
#include <sys/types.h> |
| 28 |
|
|
| 29 |
|
/* FIXME typedefs for 32/64-bit types */ |
| 67 |
|
} sg_error; |
| 68 |
|
|
| 69 |
|
void sg_set_error(sg_error code, const char *arg); |
| 70 |
+ |
void sg_set_error_with_errno(sg_error code, const char *arg); |
| 71 |
|
sg_error sg_get_error(); |
| 72 |
|
const char *sg_get_error_arg(); |
| 73 |
+ |
int sg_get_error_errno(); |
| 74 |
|
const char *sg_str_error(sg_error code); |
| 75 |
|
|
| 76 |
|
typedef struct { |
| 156 |
|
|
| 157 |
|
sg_fs_stats *sg_get_fs_stats(int *entries); |
| 158 |
|
|
| 159 |
+ |
int sg_fs_compare_device_name(const void *va, const void *vb); |
| 160 |
+ |
int sg_fs_compare_mnt_point(const void *va, const void *vb); |
| 161 |
+ |
|
| 162 |
|
typedef struct { |
| 163 |
|
char *disk_name; |
| 164 |
|
long long read_bytes; |
| 169 |
|
sg_disk_io_stats *sg_get_disk_io_stats(int *entries); |
| 170 |
|
sg_disk_io_stats *sg_get_disk_io_stats_diff(int *entries); |
| 171 |
|
|
| 172 |
+ |
int sg_disk_io_compare_name(const void *va, const void *vb); |
| 173 |
+ |
|
| 174 |
|
typedef struct { |
| 175 |
|
char *interface_name; |
| 176 |
|
long long tx; |
| 186 |
|
sg_network_io_stats *sg_get_network_io_stats(int *entries); |
| 187 |
|
sg_network_io_stats *sg_get_network_io_stats_diff(int *entries); |
| 188 |
|
|
| 189 |
+ |
int sg_network_io_compare_name(const void *va, const void *vb); |
| 190 |
+ |
|
| 191 |
|
typedef enum { |
| 192 |
|
SG_IFACE_DUPLEX_FULL, |
| 193 |
|
SG_IFACE_DUPLEX_HALF, |
| 203 |
|
|
| 204 |
|
sg_network_iface_stats *sg_get_network_iface_stats(int *entries); |
| 205 |
|
|
| 206 |
+ |
int sg_network_iface_compare_name(const void *va, const void *vb); |
| 207 |
+ |
|
| 208 |
|
typedef struct { |
| 209 |
|
long long pages_pagein; |
| 210 |
|
long long pages_pageout; |
| 245 |
|
|
| 246 |
|
sg_process_stats *sg_get_process_stats(int *entries); |
| 247 |
|
|
| 248 |
+ |
int sg_process_compare_name(const void *va, const void *vb); |
| 249 |
+ |
int sg_process_compare_pid(const void *va, const void *vb); |
| 250 |
+ |
int sg_process_compare_uid(const void *va, const void *vb); |
| 251 |
+ |
int sg_process_compare_gid(const void *va, const void *vb); |
| 252 |
+ |
int sg_process_compare_size(const void *va, const void *vb); |
| 253 |
+ |
int sg_process_compare_res(const void *va, const void *vb); |
| 254 |
+ |
int sg_process_compare_cpu(const void *va, const void *vb); |
| 255 |
+ |
int sg_process_compare_time(const void *va, const void *vb); |
| 256 |
+ |
|
| 257 |
|
typedef struct { |
| 258 |
|
int total; |
| 259 |
|
int running; |
| 264 |
|
|
| 265 |
|
sg_process_count *sg_get_process_count(); |
| 266 |
|
|
| 244 |
– |
typedef enum { |
| 245 |
– |
SG_PS_PID, |
| 246 |
– |
SG_PS_UID, |
| 247 |
– |
SG_PS_GID, |
| 248 |
– |
SG_PS_SIZE, |
| 249 |
– |
SG_PS_RES, |
| 250 |
– |
SG_PS_CPU, |
| 251 |
– |
SG_PS_TIME |
| 252 |
– |
} sg_sort_method; |
| 253 |
– |
|
| 254 |
– |
void sg_process_sort(sg_process_stats *ps, int num_ps, sg_sort_method sm); |
| 255 |
– |
|
| 256 |
– |
int sg_process_compare_pid(const void *va, const void *vb); |
| 257 |
– |
int sg_process_compare_uid(const void *va, const void *vb); |
| 258 |
– |
int sg_process_compare_gid(const void *va, const void *vb); |
| 259 |
– |
int sg_process_compare_size(const void *va, const void *vb); |
| 260 |
– |
int sg_process_compare_res(const void *va, const void *vb); |
| 261 |
– |
int sg_process_compare_cpu(const void *va, const void *vb); |
| 262 |
– |
int sg_process_compare_time(const void *va, const void *vb); |
| 263 |
– |
|
| 264 |
– |
|
| 267 |
|
#ifdef SG_ENABLE_DEPRECATED |
| 268 |
|
#include <statgrab_deprecated.h> |
| 269 |
|
#endif |
| 270 |
|
|
| 271 |
+ |
#endif |