ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/statgrab.h
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/statgrab.h (file contents):
Revision 1.40 by tdb, Wed Apr 7 14:53:40 2004 UTC vs.
Revision 1.49 by ats, Thu Apr 8 13:44:44 2004 UTC

# Line 25 | Line 25
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);
# Line 34 | Line 32 | int sg_drop_privileges(void);
32  
33   typedef enum {
34          SG_ERROR_NONE = 0,
35 <        SG_ERROR_MALLOC,
35 >        SG_ERROR_ASPRINTF,
36 >        SG_ERROR_DEVSTAT_GETDEVS,
37 >        SG_ERROR_DEVSTAT_SELECTDEVS,
38 >        SG_ERROR_ENOENT,
39 >        SG_ERROR_GETIFADDRS,
40 >        SG_ERROR_GETMNTINFO,
41 >        SG_ERROR_GETPAGESIZE,
42 >        SG_ERROR_KSTAT_DATA_LOOKUP,
43 >        SG_ERROR_KSTAT_LOOKUP,
44          SG_ERROR_KSTAT_OPEN,
45 +        SG_ERROR_KSTAT_READ,
46 +        SG_ERROR_KVM_GETSWAPINFO,
47 +        SG_ERROR_KVM_OPENFILES,
48 +        SG_ERROR_MALLOC,
49          SG_ERROR_OPEN,
50 +        SG_ERROR_OPENDIR,
51 +        SG_ERROR_PARSE,
52 +        SG_ERROR_SETEGID,
53 +        SG_ERROR_SETEUID,
54 +        SG_ERROR_SETMNTENT,
55 +        SG_ERROR_SOCKET,
56 +        SG_ERROR_SWAPCTL,
57 +        SG_ERROR_SYSCONF,
58 +        SG_ERROR_SYSCTL,
59          SG_ERROR_SYSCTLBYNAME,
60 <        SG_ERROR_PARSE
60 >        SG_ERROR_SYSCTLNAMETOMIB,
61 >        SG_ERROR_UNAME,
62 >        SG_ERROR_UNSUPPORTED,
63 >        SG_ERROR_XSW_VER_MISMATCH
64   } sg_error;
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 {
# Line 128 | Line 151 | typedef struct {
151  
152   sg_fs_stats *sg_get_fs_stats(int *entries);
153  
154 + int sg_fs_compare_device_name(const void *va, const void *vb);
155 + int sg_fs_compare_mnt_point(const void *va, const void *vb);
156 +
157   typedef struct {
158          char *disk_name;
159          long long read_bytes;
# Line 138 | Line 164 | typedef struct {
164   sg_disk_io_stats *sg_get_disk_io_stats(int *entries);
165   sg_disk_io_stats *sg_get_disk_io_stats_diff(int *entries);
166  
167 + int sg_disk_io_compare_name(const void *va, const void *vb);
168 +
169   typedef struct {
170          char *interface_name;
171          long long tx;
# Line 153 | Line 181 | typedef struct {
181   sg_network_io_stats *sg_get_network_io_stats(int *entries);
182   sg_network_io_stats *sg_get_network_io_stats_diff(int *entries);
183  
184 + int sg_network_io_compare_name(const void *va, const void *vb);
185 +
186   typedef enum {
187          SG_IFACE_DUPLEX_FULL,
188          SG_IFACE_DUPLEX_HALF,
# Line 168 | Line 198 | typedef struct {
198  
199   sg_network_iface_stats *sg_get_network_iface_stats(int *entries);
200  
201 + int sg_network_iface_compare_name(const void *va, const void *vb);
202 +
203   typedef struct {
204          long long pages_pagein;
205          long long pages_pageout;
# Line 207 | Line 239 | typedef struct {
239   } sg_process_stats;
240  
241   sg_process_stats *sg_get_process_stats(int *entries);
242 +
243 + int sg_process_compare_name(const void *va, const void *vb);
244 + int sg_process_compare_pid(const void *va, const void *vb);
245 + int sg_process_compare_uid(const void *va, const void *vb);
246 + int sg_process_compare_gid(const void *va, const void *vb);
247 + int sg_process_compare_size(const void *va, const void *vb);
248 + int sg_process_compare_res(const void *va, const void *vb);
249 + int sg_process_compare_cpu(const void *va, const void *vb);
250 + int sg_process_compare_time(const void *va, const void *vb);
251  
252   typedef struct {
253          int total;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines