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.39 by tdb, Wed Apr 7 14:45:40 2004 UTC vs.
Revision 1.50 by tdb, Fri Jul 2 11:21:30 2004 UTC

# Line 21 | Line 21
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 */
30   /* FIXME maybe tidy up field names? */
28 /* FIXME tab/space damage */
29 /* FIXME prefixes for util functions too */
31   /* FIXME comments for less obvious fields */
32  
33   int sg_init(void);
# Line 34 | Line 35 | int sg_drop_privileges(void);
35  
36   typedef enum {
37          SG_ERROR_NONE = 0,
38 <        SG_ERROR_MALLOC,
38 >        SG_ERROR_ASPRINTF,
39 >        SG_ERROR_DEVSTAT_GETDEVS,
40 >        SG_ERROR_DEVSTAT_SELECTDEVS,
41 >        SG_ERROR_ENOENT,
42 >        SG_ERROR_GETIFADDRS,
43 >        SG_ERROR_GETMNTINFO,
44 >        SG_ERROR_GETPAGESIZE,
45 >        SG_ERROR_KSTAT_DATA_LOOKUP,
46 >        SG_ERROR_KSTAT_LOOKUP,
47          SG_ERROR_KSTAT_OPEN,
48 +        SG_ERROR_KSTAT_READ,
49 +        SG_ERROR_KVM_GETSWAPINFO,
50 +        SG_ERROR_KVM_OPENFILES,
51 +        SG_ERROR_MALLOC,
52          SG_ERROR_OPEN,
53 +        SG_ERROR_OPENDIR,
54 +        SG_ERROR_PARSE,
55 +        SG_ERROR_SETEGID,
56 +        SG_ERROR_SETEUID,
57 +        SG_ERROR_SETMNTENT,
58 +        SG_ERROR_SOCKET,
59 +        SG_ERROR_SWAPCTL,
60 +        SG_ERROR_SYSCONF,
61 +        SG_ERROR_SYSCTL,
62          SG_ERROR_SYSCTLBYNAME,
63 <        SG_ERROR_PARSE
63 >        SG_ERROR_SYSCTLNAMETOMIB,
64 >        SG_ERROR_UNAME,
65 >        SG_ERROR_UNSUPPORTED,
66 >        SG_ERROR_XSW_VER_MISMATCH
67   } sg_error;
68  
69   void sg_set_error(sg_error code, const char *arg);
70   sg_error sg_get_error();
71 + const char *sg_get_error_arg();
72   const char *sg_str_error(sg_error code);
73  
74   typedef struct {
# Line 128 | Line 154 | typedef struct {
154  
155   sg_fs_stats *sg_get_fs_stats(int *entries);
156  
157 + int sg_fs_compare_device_name(const void *va, const void *vb);
158 + int sg_fs_compare_mnt_point(const void *va, const void *vb);
159 +
160   typedef struct {
161          char *disk_name;
162          long long read_bytes;
# Line 138 | Line 167 | typedef struct {
167   sg_disk_io_stats *sg_get_disk_io_stats(int *entries);
168   sg_disk_io_stats *sg_get_disk_io_stats_diff(int *entries);
169  
170 + int sg_disk_io_compare_name(const void *va, const void *vb);
171 +
172   typedef struct {
173          char *interface_name;
174          long long tx;
# Line 153 | Line 184 | typedef struct {
184   sg_network_io_stats *sg_get_network_io_stats(int *entries);
185   sg_network_io_stats *sg_get_network_io_stats_diff(int *entries);
186  
187 + int sg_network_io_compare_name(const void *va, const void *vb);
188 +
189   typedef enum {
190          SG_IFACE_DUPLEX_FULL,
191          SG_IFACE_DUPLEX_HALF,
# Line 168 | Line 201 | typedef struct {
201  
202   sg_network_iface_stats *sg_get_network_iface_stats(int *entries);
203  
204 + int sg_network_iface_compare_name(const void *va, const void *vb);
205 +
206   typedef struct {
207          long long pages_pagein;
208          long long pages_pageout;
# Line 208 | Line 243 | typedef struct {
243  
244   sg_process_stats *sg_get_process_stats(int *entries);
245  
246 + int sg_process_compare_name(const void *va, const void *vb);
247 + int sg_process_compare_pid(const void *va, const void *vb);
248 + int sg_process_compare_uid(const void *va, const void *vb);
249 + int sg_process_compare_gid(const void *va, const void *vb);
250 + int sg_process_compare_size(const void *va, const void *vb);
251 + int sg_process_compare_res(const void *va, const void *vb);
252 + int sg_process_compare_cpu(const void *va, const void *vb);
253 + int sg_process_compare_time(const void *va, const void *vb);
254 +
255   typedef struct {
256          int total;
257          int running;
# Line 222 | Line 266 | sg_process_count *sg_get_process_count();
266   #include <statgrab_deprecated.h>
267   #endif
268  
269 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines