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.46 by pajs, Thu Apr 8 12:40:30 2004 UTC vs.
Revision 1.54 by tdb, Mon Nov 1 18:30:17 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 */
# Line 60 | Line 63 | typedef enum {
63          SG_ERROR_SYSCTLNAMETOMIB,
64          SG_ERROR_UNAME,
65          SG_ERROR_UNSUPPORTED,
66 <        SG_ERROR_XSW_VER_MISMATCH
66 >        SG_ERROR_XSW_VER_MISMATCH,
67 >        SG_ERROR_PSTAT
68   } sg_error;
69  
70   void sg_set_error(sg_error code, const char *arg);
71 + void sg_set_error_with_errno(sg_error code, const char *arg);
72   sg_error sg_get_error();
73   const char *sg_get_error_arg();
74 + int sg_get_error_errno();
75   const char *sg_str_error(sg_error code);
76  
77   typedef struct {
# Line 151 | Line 157 | typedef struct {
157  
158   sg_fs_stats *sg_get_fs_stats(int *entries);
159  
160 + int sg_fs_compare_device_name(const void *va, const void *vb);
161 + int sg_fs_compare_mnt_point(const void *va, const void *vb);
162 +
163   typedef struct {
164          char *disk_name;
165          long long read_bytes;
# Line 161 | Line 170 | typedef struct {
170   sg_disk_io_stats *sg_get_disk_io_stats(int *entries);
171   sg_disk_io_stats *sg_get_disk_io_stats_diff(int *entries);
172  
173 + int sg_disk_io_compare_name(const void *va, const void *vb);
174 +
175   typedef struct {
176          char *interface_name;
177          long long tx;
# Line 176 | Line 187 | typedef struct {
187   sg_network_io_stats *sg_get_network_io_stats(int *entries);
188   sg_network_io_stats *sg_get_network_io_stats_diff(int *entries);
189  
190 + int sg_network_io_compare_name(const void *va, const void *vb);
191 +
192   typedef enum {
193          SG_IFACE_DUPLEX_FULL,
194          SG_IFACE_DUPLEX_HALF,
# Line 191 | Line 204 | typedef struct {
204  
205   sg_network_iface_stats *sg_get_network_iface_stats(int *entries);
206  
207 + int sg_network_iface_compare_name(const void *va, const void *vb);
208 +
209   typedef struct {
210          long long pages_pagein;
211          long long pages_pageout;
# Line 231 | Line 246 | typedef struct {
246  
247   sg_process_stats *sg_get_process_stats(int *entries);
248  
249 + int sg_process_compare_name(const void *va, const void *vb);
250 + int sg_process_compare_pid(const void *va, const void *vb);
251 + int sg_process_compare_uid(const void *va, const void *vb);
252 + int sg_process_compare_gid(const void *va, const void *vb);
253 + int sg_process_compare_size(const void *va, const void *vb);
254 + int sg_process_compare_res(const void *va, const void *vb);
255 + int sg_process_compare_cpu(const void *va, const void *vb);
256 + int sg_process_compare_time(const void *va, const void *vb);
257 +
258   typedef struct {
259          int total;
260          int running;
# Line 241 | Line 265 | typedef struct {
265  
266   sg_process_count *sg_get_process_count();
267  
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_sort_method;
253
254 void sg_process_sort(sg_process_stats *ps, int num_ps, sg_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
268   #ifdef SG_ENABLE_DEPRECATED
269   #include <statgrab_deprecated.h>
270   #endif
271  
272 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines