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.33 by ats, Mon Apr 5 15:40:15 2004 UTC vs.
Revision 1.42 by tdb, Wed Apr 7 21:08:40 2004 UTC

# Line 1 | Line 1
1   /*
2 < * i-scream central monitoring system
2 > * i-scream libstatgrab
3   * http://www.i-scream.org
4   * Copyright (C) 2000-2004 i-scream
5   *
# Line 32 | Line 32
32   int sg_init(void);
33   int sg_drop_privileges(void);
34  
35 + typedef enum {
36 +        SG_ERROR_NONE = 0,
37 +        SG_ERROR_ASPRINTF,
38 +        SG_ERROR_DEVSTAT_GETDEVS,
39 +        SG_ERROR_DEVSTAT_SELECTDEVS,
40 +        SG_ERROR_ENOENT,
41 +        SG_ERROR_GETIFADDRS,
42 +        SG_ERROR_GETMNTINFO,
43 +        SG_ERROR_GETPAGESIZE,
44 +        SG_ERROR_KSTAT_DATA_LOOKUP,
45 +        SG_ERROR_KSTAT_LOOKUP,
46 +        SG_ERROR_KSTAT_OPEN,
47 +        SG_ERROR_KSTAT_READ,
48 +        SG_ERROR_KVM_GETSWAPINFO,
49 +        SG_ERROR_KVM_OPENFILES,
50 +        SG_ERROR_MALLOC,
51 +        SG_ERROR_OPEN,
52 +        SG_ERROR_OPENDIR,
53 +        SG_ERROR_PARSE,
54 +        SG_ERROR_SETEGID,
55 +        SG_ERROR_SETEUID,
56 +        SG_ERROR_SETMNTENT,
57 +        SG_ERROR_SOCKET,
58 +        SG_ERROR_SWAPCTL,
59 +        SG_ERROR_SYSCONF,
60 +        SG_ERROR_SYSCTL,
61 +        SG_ERROR_SYSCTLBYNAME,
62 +        SG_ERROR_SYSCTLNAMETOMIB,
63 +        SG_ERROR_UNAME,
64 +        SG_ERROR_UNSUPPORTED,
65 +        SG_ERROR_XSW_VER_MISMATCH
66 + } sg_error;
67 +
68 + void sg_set_error(sg_error code, const char *arg);
69 + sg_error sg_get_error();
70 + const char *sg_str_error(sg_error code);
71 +
72   typedef struct {
73          char *os_name;
74          char *os_release;
# Line 44 | Line 81 | typedef struct {
81   sg_host_info *sg_get_host_info();
82  
83   typedef struct {
84 <        long long user;
85 <        long long kernel;
86 <        long long idle;
87 <        long long iowait;
88 <        long long swap;
89 <        long long nice;
90 <        long long total;
91 <        time_t systime;
84 >        long long user;
85 >        long long kernel;
86 >        long long idle;
87 >        long long iowait;
88 >        long long swap;
89 >        long long nice;
90 >        long long total;
91 >        time_t systime;
92   } sg_cpu_stats;
93  
94   sg_cpu_stats *sg_get_cpu_stats();
95   sg_cpu_stats *sg_get_cpu_stats_diff();
96  
97   typedef struct {
98 <        float user;
99 <        float kernel;
100 <        float idle;
101 <        float iowait;
102 <        float swap;
103 <        float nice;
98 >        float user;
99 >        float kernel;
100 >        float idle;
101 >        float iowait;
102 >        float swap;
103 >        float nice;
104          time_t time_taken;
105   } sg_cpu_percents;
106  
# Line 102 | Line 139 | typedef struct {
139   sg_swap_stats *sg_get_swap_stats();
140  
141   typedef struct {
142 <        char *device_name;
142 >        char *device_name;
143          char *fs_type;
144 <        char *mnt_point;
145 <        long long size;
146 <        long long used;
147 <        long long avail;
148 <        long long total_inodes;
144 >        char *mnt_point;
145 >        long long size;
146 >        long long used;
147 >        long long avail;
148 >        long long total_inodes;
149          long long used_inodes;
150 <        long long free_inodes;
150 >        long long free_inodes;
151   } sg_fs_stats;
152  
153   sg_fs_stats *sg_get_fs_stats(int *entries);
# Line 204 | Line 241 | typedef struct {
241   } sg_process_count;
242  
243   sg_process_count *sg_get_process_count();
244 +
245 + #ifdef SG_ENABLE_DEPRECATED
246 + #include <statgrab_deprecated.h>
247 + #endif
248  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines