1 /* 2 ** structure containing only relevant process-info extracted 3 ** from kernel's process-administration 4 */ 5 struct tstat_20 { 6 /* GENERAL TASK INFO */ 7 struct gen_20 { 8 int tgid; /* threadgroup identification */ 9 int pid; /* process identification */ 10 int ppid; /* parent process identification*/ 11 int ruid; /* real user identification */ 12 int euid; /* eff. user identification */ 13 int suid; /* saved user identification */ 14 int fsuid; /* fs user identification */ 15 int rgid; /* real group identification */ 16 int egid; /* eff. group identification */ 17 int sgid; /* saved group identification */ 18 int fsgid; /* fs group identification */ 19 int nthr; /* number of threads in tgroup */ 20 char name[PNAMLEN+1];/* process name string */ 21 char isproc; /* boolean: process level? */ 22 char state; /* process state ('E' = exited) */ 23 int excode; /* process exit status */ 24 time_t btime; /* process start time (epoch) */ 25 time_t elaps; /* process elaps time (hertz) */ 26 char cmdline[CMDLEN+1];/* command-line string */ 27 int nthrslpi; /* # threads in state 'S' */ 28 int nthrslpu; /* # threads in state 'D' */ 29 int nthrrun; /* # threads in state 'R' */ 30 int ifuture[4]; /* reserved */ 31 } gen; 32 33 /* CPU STATISTICS */ 34 struct cpu_20 { 35 count_t utime; /* time user text (ticks) */ 36 count_t stime; /* time system text (ticks) */ 37 int nice; /* nice value */ 38 int prio; /* priority */ 39 int rtprio; /* realtime priority */ 40 int policy; /* scheduling policy */ 41 int curcpu; /* current processor */ 42 int sleepavg; /* sleep average percentage */ 43 int ifuture[4]; /* reserved for future use */ 44 count_t cfuture[4]; /* reserved for future use */ 45 } cpu; 46 47 /* DISK STATISTICS */ 48 struct dsk_20 { 49 count_t rio; /* number of read requests */ 50 count_t rsz; /* cumulative # sectors read */ 51 count_t wio; /* number of write requests */ 52 count_t wsz; /* cumulative # sectors written */ 53 count_t cwsz; /* cumulative # written sectors */ 54 /* being cancelled */ 55 count_t cfuture[4]; /* reserved for future use */ 56 } dsk; 57 58 /* MEMORY STATISTICS */ 59 struct mem_20 { 60 count_t minflt; /* number of page-reclaims */ 61 count_t majflt; /* number of page-faults */ 62 count_t vexec; /* virtmem execfile (Kb) */ 63 count_t vmem; /* virtual memory (Kb) */ 64 count_t rmem; /* resident memory (Kb) */ 65 count_t vgrow; /* virtual growth (Kb) */ 66 count_t rgrow; /* resident growth (Kb) */ 67 count_t vdata; /* virtmem data (Kb) */ 68 count_t vstack; /* virtmem stack (Kb) */ 69 count_t vlibs; /* virtmem libexec (Kb) */ 70 count_t vswap; /* swap space used (Kb) */ 71 } mem; 72 73 /* NETWORK STATISTICS */ 74 struct net_20 { 75 count_t tcpsnd; /* number of TCP-packets sent */ 76 count_t tcpssz; /* cumulative size packets sent */ 77 count_t tcprcv; /* number of TCP-packets recved */ 78 count_t tcprsz; /* cumulative size packets rcvd */ 79 count_t udpsnd; /* number of UDP-packets sent */ 80 count_t udpssz; /* cumulative size packets sent */ 81 count_t udprcv; /* number of UDP-packets recved */ 82 count_t udprsz; /* cumulative size packets sent */ 83 count_t avail1; /* */ 84 count_t avail2; /* */ 85 count_t cfuture[4]; /* reserved for future use */ 86 } net; 87 };