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.2 by pajs, Tue Feb 18 23:12:08 2003 UTC vs.
Revision 1.16 by tdb, Mon Nov 10 21:07:04 2003 UTC

# Line 1 | Line 1
1   /*
2   * i-scream central monitoring system
3 < * http://www.i-scream.org.uk
4 < * Copyright (C) 2000-2002 i-scream
3 > * http://www.i-scream.org
4 > * Copyright (C) 2000-2003 i-scream
5   *
6   * This program is free software; you can redistribute it and/or
7   * modify it under the terms of the GNU General Public License
# Line 19 | Line 19
19   */
20  
21   #include <sys/types.h>
22 + #ifdef NETBSD
23 + #include <limits.h>
24 + #endif
25 + #ifdef CYGWIN
26 + #include <sys/unistd.h>
27 + #endif
28  
29   typedef struct{
30 <        uint_t user;
31 <        uint_t kernel;
32 <        uint_t idle;
33 <        uint_t iowait;
34 <        uint_t swap;
35 <        uint_t nice;
36 <        uint_t total;
30 >        long long user;
31 >        long long kernel;
32 >        long long idle;
33 >        long long iowait;
34 >        long long swap;
35 >        long long nice;
36 >        long long total;
37          time_t systime;
38   }cpu_states_t;
39  
# Line 57 | Line 63 | typedef struct{
63   #ifdef SOLARIS
64   #define MAX_LOGIN_NAME_SIZE 8
65   #endif
66 + #if defined(LINUX) || defined(FREEBSD)
67 + #if defined(CYGWIN)
68 + #define MAX_LOGIN_NAME_SIZE _SC_LOGIN_NAME_MAX
69 + #else
70 + #define MAX_LOGIN_NAME_SIZE UT_NAMESIZE
71 + #endif
72 + #endif
73 + #ifdef NETBSD
74 + #define MAX_LOGIN_NAME_SIZE _POSIX_LOGIN_NAME_MAX
75 + #endif
76  
61 typedef char name[MAX_LOGIN_NAME_SIZE+1];
62
77   typedef struct{
78 <        name *name_list;
78 >        char *name_list;
79          int num_entries;
80   }user_stat_t;
81  
# Line 93 | Line 107 | typedef struct {
107   }disk_stat_t;
108  
109   typedef struct{
110 +        char *disk_name;
111 +        long long read_bytes;
112 +        long long write_bytes;
113 +        time_t systime;
114 + }diskio_stat_t;
115 +
116 + typedef struct{
117          int total;
118          int running;
119          int sleeping;
# Line 108 | Line 129 | typedef struct{
129   }network_stat_t;
130  
131   typedef struct{
111        long long num_pagein;
112        long long num_pageout;
132          long long pages_pagein;
133          long long pages_pageout;
134          time_t systime;
# Line 130 | Line 149 | swap_stat_t *get_swap_stats();
149   general_stat_t *get_general_stats();
150  
151   disk_stat_t *get_disk_stats(int *entries);
152 + diskio_stat_t *get_diskio_stats(int *entries);
153 + diskio_stat_t *get_diskio_stats_diff(int *entries);
154  
155   process_stat_t *get_process_stats();
156  
157   network_stat_t *get_network_stats(int *entries);
158 + network_stat_t *get_network_stats_diff(int *entries);
159  
160   page_stat_t *get_page_stats();
161 + page_stat_t *get_page_stats_diff();
162 +
163 + int statgrab_init(void);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines