1 /* 2 ** structure containing only relevant process-info extracted 3 ** from kernel's process-administration 4 */ 5 struct tstat_22 { 6 /* GENERAL TASK INFO */ 7 struct gen_22 { 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 31 int ctid; /* OpenVZ container ID */ 32 int vpid; /* OpenVZ virtual PID */ 33 34 int ifuture[5]; /* reserved */ 35 } gen; 36 37 /* CPU STATISTICS */ 38 struct cpu_22 { 39 count_t utime; /* time user text (ticks) */ 40 count_t stime; /* time system text (ticks) */ 41 int nice; /* nice value */ 42 int prio; /* priority */ 43 int rtprio; /* realtime priority */ 44 int policy; /* scheduling policy */ 45 int curcpu; /* current processor */ 46 int sleepavg; /* sleep average percentage */ 47 int ifuture[4]; /* reserved for future use */ 48 count_t cfuture[4]; /* reserved for future use */ 49 } cpu; 50 51 /* DISK STATISTICS */ 52 struct dsk_22 { 53 count_t rio; /* number of read requests */ 54 count_t rsz; /* cumulative # sectors read */ 55 count_t wio; /* number of write requests */ 56 count_t wsz; /* cumulative # sectors written */ 57 count_t cwsz; /* cumulative # written sectors */ 58 /* being cancelled */ 59 count_t cfuture[4]; /* reserved for future use */ 60 } dsk; 61 62 /* MEMORY STATISTICS */ 63 struct mem_22 { 64 count_t minflt; /* number of page-reclaims */ 65 count_t majflt; /* number of page-faults */ 66 count_t vexec; /* virtmem execfile (Kb) */ 67 count_t vmem; /* virtual memory (Kb) */ 68 count_t rmem; /* resident memory (Kb) */ 69 count_t pmem; /* resident memory (Kb) */ 70 count_t vgrow; /* virtual growth (Kb) */ 71 count_t rgrow; /* resident growth (Kb) */ 72 count_t vdata; /* virtmem data (Kb) */ 73 count_t vstack; /* virtmem stack (Kb) */ 74 count_t vlibs; /* virtmem libexec (Kb) */ 75 count_t vswap; /* swap space used (Kb) */ 76 count_t cfuture[4]; /* reserved for future use */ 77 } mem; 78 79 /* NETWORK STATISTICS */ 80 struct net_22 { 81 count_t tcpsnd; /* number of TCP-packets sent */ 82 count_t tcpssz; /* cumulative size packets sent */ 83 count_t tcprcv; /* number of TCP-packets recved */ 84 count_t tcprsz; /* cumulative size packets rcvd */ 85 count_t udpsnd; /* number of UDP-packets sent */ 86 count_t udpssz; /* cumulative size packets sent */ 87 count_t udprcv; /* number of UDP-packets recved */ 88 count_t udprsz; /* cumulative size packets sent */ 89 count_t avail1; /* */ 90 count_t avail2; /* */ 91 count_t cfuture[4]; /* reserved for future use */ 92 } net; 93 };