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.41 by tdb, Wed Apr 7 19:26:16 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_MALLOC,
38 +        SG_ERROR_KSTAT_OPEN,
39 +        SG_ERROR_OPEN,
40 +        SG_ERROR_SYSCTLBYNAME,
41 +        SG_ERROR_SYSCTL,
42 +        SG_ERROR_PARSE,
43 +        SG_ERROR_GETMNTINFO,
44 +        SG_ERROR_SETMNTENT,
45 +        SG_ERROR_DEVSTAT_GETDEVS,
46 +        SG_ERROR_DEVSTAT_SELECTDEVS,
47 +        SG_ERROR_ASPRINTF,
48 +        SG_ERROR_UNSUPPORTED
49 + } sg_error;
50 +
51 + void sg_set_error(sg_error code, const char *arg);
52 + sg_error sg_get_error();
53 + const char *sg_str_error(sg_error code);
54 +
55   typedef struct {
56          char *os_name;
57          char *os_release;
# Line 44 | Line 64 | typedef struct {
64   sg_host_info *sg_get_host_info();
65  
66   typedef struct {
67 <        long long user;
68 <        long long kernel;
69 <        long long idle;
70 <        long long iowait;
71 <        long long swap;
72 <        long long nice;
73 <        long long total;
74 <        time_t systime;
67 >        long long user;
68 >        long long kernel;
69 >        long long idle;
70 >        long long iowait;
71 >        long long swap;
72 >        long long nice;
73 >        long long total;
74 >        time_t systime;
75   } sg_cpu_stats;
76  
77   sg_cpu_stats *sg_get_cpu_stats();
78   sg_cpu_stats *sg_get_cpu_stats_diff();
79  
80   typedef struct {
81 <        float user;
82 <        float kernel;
83 <        float idle;
84 <        float iowait;
85 <        float swap;
86 <        float nice;
81 >        float user;
82 >        float kernel;
83 >        float idle;
84 >        float iowait;
85 >        float swap;
86 >        float nice;
87          time_t time_taken;
88   } sg_cpu_percents;
89  
# Line 102 | Line 122 | typedef struct {
122   sg_swap_stats *sg_get_swap_stats();
123  
124   typedef struct {
125 <        char *device_name;
125 >        char *device_name;
126          char *fs_type;
127 <        char *mnt_point;
128 <        long long size;
129 <        long long used;
130 <        long long avail;
131 <        long long total_inodes;
127 >        char *mnt_point;
128 >        long long size;
129 >        long long used;
130 >        long long avail;
131 >        long long total_inodes;
132          long long used_inodes;
133 <        long long free_inodes;
133 >        long long free_inodes;
134   } sg_fs_stats;
135  
136   sg_fs_stats *sg_get_fs_stats(int *entries);
# Line 204 | Line 224 | typedef struct {
224   } sg_process_count;
225  
226   sg_process_count *sg_get_process_count();
227 +
228 + #ifdef SG_ENABLE_DEPRECATED
229 + #include <statgrab_deprecated.h>
230 + #endif
231  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines