xref: /original-bsd/usr.bin/systat/systat.h (revision f82e54c4)
1 /*      systat.h     1.4     84/08/09     */
2 
3 #include <sys/dk.h>
4 #include <curses.h>
5 
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;
13 long    nproc, procp;
14 struct	proc *kprocp;
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];
26 int     numknown;
27 
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 */
36 	int	(*c_cmd)();		/* display command interpreter */
37 	char	c_flags;		/* been initialized (right now) */
38 };
39 
40 struct	cmdtab *curcmd;
41 struct	cmdtab cmdtab[];
42 struct	cmdtab *lookup();
43 
44 int     kmem, mem, swap;
45 int     naptime, col;
46 
47 long	ntext, textp;
48 struct	text *xtext;
49 
50 double  lccpu;
51 
52 char    *kmemf, *memf, *swapf;
53 char	dr_name[DK_NDRIVE][10];
54 int	ndrives;
55 int	hz;
56 float	dk_mspw[DK_NDRIVE];
57 char    c, *namp, hostname[32];
58 
59 struct  pte *usrpt;
60 struct  pte *Usrptma;
61 
62 WINDOW  *wnd;
63 int	CMDLINE;
64 
65 char    *malloc(), *calloc(), *strncpy();
66 long    getw();
67