25 |
|
|
26 |
|
/* FIXME typedefs for 32/64-bit types */ |
27 |
|
/* FIXME maybe tidy up field names? */ |
28 |
– |
/* FIXME tab/space damage */ |
29 |
– |
/* FIXME prefixes for util functions too */ |
28 |
|
/* FIXME comments for less obvious fields */ |
29 |
|
|
30 |
|
int sg_init(void); |
65 |
|
|
66 |
|
void sg_set_error(sg_error code, const char *arg); |
67 |
|
sg_error sg_get_error(); |
68 |
+ |
const char *sg_get_error_arg(); |
69 |
|
const char *sg_str_error(sg_error code); |
70 |
|
|
71 |
|
typedef struct { |
240 |
|
} sg_process_count; |
241 |
|
|
242 |
|
sg_process_count *sg_get_process_count(); |
243 |
+ |
|
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_process_sort_method; |
253 |
+ |
|
254 |
+ |
void sg_process_sort(sg_process_stats *ps, int num_ps, sg_process_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 |
|
|
265 |
|
#ifdef SG_ENABLE_DEPRECATED |
266 |
|
#include <statgrab_deprecated.h> |