1 #define MAXCPU_22 2048 2 #define MAXDSK_22 1024 3 #define MAXLVM_22 2048 4 #define MAXMDD_22 256 5 #define MAXINTF_22 128 6 #define MAXCONTAINER_22 128 7 #define MAXNFSMOUNT_22 64 8 9 #define MAXDKNAM 32 10 11 /************************************************************************/ 12 13 struct memstat_22 { 14 count_t physmem; // number of physical pages 15 count_t freemem; // number of free pages 16 count_t buffermem; // number of buffer pages 17 count_t slabmem; // number of slab pages 18 count_t cachemem; // number of cache pages 19 count_t cachedrt; // number of cache pages (dirty) 20 21 count_t totswap; // number of pages in swap 22 count_t freeswap; // number of free swap pages 23 24 count_t pgscans; // number of page scans 25 count_t pgsteal; // number of page steals 26 count_t allocstall; // try to free pages forced 27 count_t swouts; // number of pages swapped out 28 count_t swins; // number of pages swapped in 29 30 count_t commitlim; // commit limit in pages 31 count_t committed; // number of reserved pages 32 33 count_t shmem; // tot shmem incl. tmpfs (pages) 34 count_t shmrss; // resident shared memory (pages) 35 count_t shmswp; // swapped shared memory (pages) 36 37 count_t slabreclaim; // reclaimable slab (pages) 38 39 count_t tothugepage; // total huge pages (huge pages) 40 count_t freehugepage; // free huge pages (huge pages) 41 count_t hugepagesz; // huge page size (bytes) 42 43 count_t vmwballoon; // vmware claimed balloon pages 44 45 count_t cfuture[8]; // reserved for future use 46 }; 47 48 /************************************************************************/ 49 50 struct netstat_22 { 51 struct ipv4_stats ipv4; 52 struct icmpv4_stats_wrong icmpv4; 53 struct udpv4_stats udpv4; 54 55 struct ipv6_stats ipv6; 56 struct icmpv6_stats icmpv6; 57 struct udpv6_stats udpv6; 58 59 struct tcp_stats tcp; 60 }; 61 62 /************************************************************************/ 63 64 struct freqcnt_22 { 65 count_t maxfreq;/* frequency in MHz */ 66 count_t cnt; /* number of clock ticks times state */ 67 count_t ticks; /* number of total clock ticks */ 68 /* if zero, cnt is actul freq */ 69 }; 70 71 struct percpu_22 { 72 int cpunr; 73 count_t stime; /* system time in clock ticks */ 74 count_t utime; /* user time in clock ticks */ 75 count_t ntime; /* nice time in clock ticks */ 76 count_t itime; /* idle time in clock ticks */ 77 count_t wtime; /* iowait time in clock ticks */ 78 count_t Itime; /* irq time in clock ticks */ 79 count_t Stime; /* softirq time in clock ticks */ 80 count_t steal; /* steal time in clock ticks */ 81 count_t guest; /* guest time in clock ticks */ 82 struct freqcnt_22 freqcnt;/* frequency scaling info */ 83 count_t cfuture[4]; /* reserved for future use */ 84 }; 85 86 struct cpustat_22 { 87 count_t nrcpu; /* number of cpu's */ 88 count_t devint; /* number of device interrupts */ 89 count_t csw; /* number of context switches */ 90 count_t nprocs; /* number of processes started */ 91 float lavg1; /* load average last minute */ 92 float lavg5; /* load average last 5 minutes */ 93 float lavg15; /* load average last 15 minutes */ 94 count_t cfuture[4]; /* reserved for future use */ 95 96 struct percpu_22 all; 97 struct percpu_22 cpu[MAXCPU_22]; 98 }; 99 100 /************************************************************************/ 101 102 struct perdsk_22 { 103 char name[MAXDKNAM]; /* empty string for last */ 104 count_t nread; /* number of read transfers */ 105 count_t nrsect; /* number of sectors read */ 106 count_t nwrite; /* number of write transfers */ 107 count_t nwsect; /* number of sectors written */ 108 count_t io_ms; /* number of millisecs spent for I/O */ 109 count_t avque; /* average queue length */ 110 count_t cfuture[4]; /* reserved for future use */ 111 }; 112 113 struct dskstat_22 { 114 int ndsk; /* number of physical disks */ 115 int nmdd; /* number of md volumes */ 116 int nlvm; /* number of logical volumes */ 117 struct perdsk_22 dsk[MAXDSK_22]; 118 struct perdsk_22 mdd[MAXMDD_22]; 119 struct perdsk_22 lvm[MAXLVM_22]; 120 }; 121 122 /************************************************************************/ 123 124 struct perintf_22 { 125 char name[16]; /* empty string for last */ 126 127 count_t rbyte; /* number of read bytes */ 128 count_t rpack; /* number of read packets */ 129 count_t rerrs; /* receive errors */ 130 count_t rdrop; /* receive drops */ 131 count_t rfifo; /* receive fifo */ 132 count_t rframe; /* receive framing errors */ 133 count_t rcompr; /* receive compressed */ 134 count_t rmultic;/* receive multicast */ 135 count_t rfuture[4]; /* reserved for future use */ 136 137 count_t sbyte; /* number of written bytes */ 138 count_t spack; /* number of written packets */ 139 count_t serrs; /* transmit errors */ 140 count_t sdrop; /* transmit drops */ 141 count_t sfifo; /* transmit fifo */ 142 count_t scollis;/* collisions */ 143 count_t scarrier;/* transmit carrier */ 144 count_t scompr; /* transmit compressed */ 145 count_t sfuture[4]; /* reserved for future use */ 146 147 char type; /* interface type ('e'/'w'/'?') */ 148 long speed; /* interface speed in megabits/second */ 149 long speedp; /* previous interface speed */ 150 char duplex; /* full duplex (boolean) */ 151 count_t cfuture[4]; /* reserved for future use */ 152 }; 153 154 struct intfstat_22 { 155 int nrintf; 156 struct perintf_22 intf[MAXINTF_22]; 157 }; 158 159 /************************************************************************/ 160 161 struct pernfsmount_22 { 162 char mountdev[128]; /* mountdevice */ 163 count_t age; /* number of seconds mounted */ 164 165 count_t bytesread; /* via normal reads */ 166 count_t byteswrite; /* via normal writes */ 167 count_t bytesdread; /* via direct reads */ 168 count_t bytesdwrite; /* via direct writes */ 169 count_t bytestotread; /* via reads */ 170 count_t bytestotwrite; /* via writes */ 171 count_t pagesmread; /* via mmap reads */ 172 count_t pagesmwrite; /* via mmap writes */ 173 174 count_t future[8]; 175 }; 176 177 struct nfsstat_22 { 178 struct { 179 count_t netcnt; 180 count_t netudpcnt; 181 count_t nettcpcnt; 182 count_t nettcpcon; 183 184 count_t rpccnt; 185 count_t rpcbadfmt; 186 count_t rpcbadaut; 187 count_t rpcbadcln; 188 189 count_t rpcread; 190 count_t rpcwrite; 191 192 count_t rchits; /* repcache hits */ 193 count_t rcmiss; /* repcache misses */ 194 count_t rcnoca; /* uncached requests */ 195 196 count_t nrbytes; /* read bytes */ 197 count_t nwbytes; /* written bytes */ 198 199 count_t future[8]; 200 } server; 201 202 struct { 203 count_t rpccnt; 204 count_t rpcretrans; 205 count_t rpcautrefresh; 206 207 count_t rpcread; 208 count_t rpcwrite; 209 210 count_t future[8]; 211 } client; 212 213 struct { 214 int nrmounts; 215 struct pernfsmount_22 nfsmnt[MAXNFSMOUNT_22]; 216 } nfsmounts; 217 }; 218 219 /************************************************************************/ 220 221 struct percontainer_22 { 222 unsigned long ctid; /* container id */ 223 unsigned long numproc; /* number of processes */ 224 225 count_t system; /* */ 226 count_t user; /* */ 227 count_t nice; /* */ 228 count_t uptime; /* */ 229 230 count_t physpages; /* */ 231 }; 232 233 struct contstat_22 { 234 int nrcontainer; 235 struct percontainer_22 cont[MAXCONTAINER_22]; 236 }; 237 238 /************************************************************************/ 239 /* 240 ** experimental stuff for access to local HTTP daemons 241 */ 242 243 struct wwwstat_22 { 244 count_t accesses; /* total number of HTTP-requests */ 245 count_t totkbytes; /* total kbytes transfer for HTTP-req */ 246 count_t uptime; /* number of seconds since startup */ 247 int bworkers; /* number of busy httpd-daemons */ 248 int iworkers; /* number of idle httpd-daemons */ 249 }; 250 /************************************************************************/ 251 252 struct sstat_22 { 253 struct cpustat_22 cpu; 254 struct memstat_22 mem; 255 struct netstat_22 net; 256 struct intfstat_22 intf; 257 struct dskstat_22 dsk; 258 struct nfsstat_22 nfs; 259 struct contstat_22 cfs; 260 261 struct wwwstat_22 www; 262 };