rstat.x
001:
002:
003:
004:
005:
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016:
017:
018:
019:
020:
021:
022:
023:
024:
025:
026:
027:
028:
029:
030:
031:
032:
033:
034:
035:
036:
037: #ifdef RPC_HDR
038:
039: %#ifndef FSCALE
040: %
041:
042:
043: %#define FSHIFT 8
044: %#define FSCALE (1<<FSHIFT)
045: %
046: %#endif
047:
048: #endif
049:
050: const CPUSTATES = 4;
051: const DK_NDRIVE = 4;
052:
053:
054:
055:
056: struct rstat_timeval {
057: unsigned int tv_sec;
058: unsigned int tv_usec;
059: };
060:
061: struct statstime {
062: int cp_time[CPUSTATES];
063: int dk_xfer[DK_NDRIVE];
064: unsigned int v_pgpgin;
065: unsigned int v_pgpgout;
066: unsigned int v_pswpin;
067: unsigned int v_pswpout;
068: unsigned int v_intr;
069: int if_ipackets;
070: int if_ierrors;
071: int if_oerrors;
072: int if_collisions;
073: unsigned int v_swtch;
074: int avenrun[3];
075: rstat_timeval boottime;
076: rstat_timeval curtime;
077: int if_opackets;
078: };
079:
080: struct statsswtch {
081: int cp_time[CPUSTATES];
082: int dk_xfer[DK_NDRIVE];
083: unsigned int v_pgpgin;
084: unsigned int v_pgpgout;
085: unsigned int v_pswpin;
086: unsigned int v_pswpout;
087: unsigned int v_intr;
088: int if_ipackets;
089: int if_ierrors;
090: int if_oerrors;
091: int if_collisions;
092: unsigned int v_swtch;
093: unsigned int avenrun[3];
094: rstat_timeval boottime;
095: int if_opackets;
096: };
097:
098: struct stats {
099: int cp_time[CPUSTATES];
100: int dk_xfer[DK_NDRIVE];
101: unsigned int v_pgpgin;
102: unsigned int v_pgpgout;
103: unsigned int v_pswpin;
104: unsigned int v_pswpout;
105: unsigned int v_intr;
106: int if_ipackets;
107: int if_ierrors;
108: int if_oerrors;
109: int if_collisions;
110: int if_opackets;
111: };
112:
113:
114: program RSTATPROG {
115:
116:
117:
118: version RSTATVERS_TIME {
119: statstime
120: RSTATPROC_STATS(void) = 1;
121:
122: unsigned int
123: RSTATPROC_HAVEDISK(void) = 2;
124: } = 3;
125:
126:
127:
128: version RSTATVERS_SWTCH {
129: statsswtch
130: RSTATPROC_STATS(void) = 1;
131:
132: unsigned int
133: RSTATPROC_HAVEDISK(void) = 2;
134: } = 2;
135:
136:
137:
138: version RSTATVERS_ORIG {
139: stats
140: RSTATPROC_STATS(void) = 1;
141:
142: unsigned int
143: RSTATPROC_HAVEDISK(void) = 2;
144: } = 1;
145: } = 100001;
146:
© Andrew Scott 2006 -
2025,
All Rights Reserved