Commit | Line | Data |
---|---|---|
9c0c7319 | 1 | /* systat.h 1.5 85/04/28 */ |
b50325b5 | 2 | |
855ff304 | 3 | #include <sys/dk.h> |
b50325b5 | 4 | #include <curses.h> |
b50325b5 | 5 | |
b50325b5 SL |
6 | struct p_times { |
7 | short pt_pid; | |
8 | float pt_pctcpu; | |
9 | int pt_uid; | |
10 | int pt_paddr; | |
11 | struct proc *pt_pp; | |
12 | } *pt; | |
855ff304 KM |
13 | long nproc, procp; |
14 | struct proc *kprocp; | |
b50325b5 SL |
15 | |
16 | struct procs { | |
17 | int pid; | |
18 | char cmd[16]; | |
19 | } procs[200]; | |
20 | int numprocs; | |
21 | ||
22 | struct users { | |
23 | int k_uid; | |
24 | char k_name[16]; | |
25 | } known[30]; | |
855ff304 | 26 | int numknown; |
b50325b5 | 27 | |
d830bff6 SL |
28 | struct cmdtab { |
29 | char *c_name; /* command name */ | |
30 | int (*c_refresh)(); /* display refresh */ | |
31 | int (*c_fetch)(); /* sets up data structures */ | |
32 | int (*c_label)(); /* label display */ | |
33 | int (*c_init)(); /* initialize namelist, etc. */ | |
34 | WINDOW *(*c_open)(); /* open display */ | |
35 | int (*c_close)(); /* close display */ | |
855ff304 | 36 | int (*c_cmd)(); /* display command interpreter */ |
9c0c7319 | 37 | char c_flags; /* see below */ |
d830bff6 SL |
38 | }; |
39 | ||
9c0c7319 SL |
40 | #define CF_INIT 0x1 /* been initialized */ |
41 | #define CF_LOADAV 0x2 /* display w/ load average */ | |
42 | ||
d830bff6 SL |
43 | struct cmdtab *curcmd; |
44 | struct cmdtab cmdtab[]; | |
4fefc2e5 | 45 | struct cmdtab *lookup(); |
d830bff6 | 46 | |
855ff304 KM |
47 | int kmem, mem, swap; |
48 | int naptime, col; | |
49 | ||
50 | long ntext, textp; | |
d830bff6 | 51 | struct text *xtext; |
855ff304 | 52 | |
b50325b5 | 53 | double lccpu; |
9c0c7319 | 54 | double avenrun[3]; |
855ff304 KM |
55 | |
56 | char *kmemf, *memf, *swapf; | |
57 | char dr_name[DK_NDRIVE][10]; | |
58 | int ndrives; | |
59 | int hz; | |
9c0c7319 | 60 | int phz; |
855ff304 KM |
61 | float dk_mspw[DK_NDRIVE]; |
62 | char c, *namp, hostname[32]; | |
63 | ||
b50325b5 SL |
64 | struct pte *usrpt; |
65 | struct pte *Usrptma; | |
66 | ||
67 | WINDOW *wnd; | |
855ff304 KM |
68 | int CMDLINE; |
69 | ||
70 | char *malloc(), *calloc(), *strncpy(); | |
71 | long getw(); |