1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)systat.h 5.1 (Berkeley) 5/30/85
7: */
8:
9: #include <netdb.h>
10: #include <nlist.h>
11: #include <signal.h>
12: #include <curses.h>
13:
14: #include <sys/param.h>
15: #include <sys/file.h>
16: #include <sys/dk.h>
17:
18: #include <netinet/in.h>
19: #include <arpa/inet.h>
20:
21: struct p_times {
22: short pt_pid;
23: float pt_pctcpu;
24: int pt_uid;
25: int pt_paddr;
26: struct proc *pt_pp;
27: } *pt;
28: long nproc, procp;
29: struct proc *kprocp;
30:
31: struct procs {
32: int pid;
33: char cmd[16];
34: } procs[200];
35: int numprocs;
36:
37: struct users {
38: int k_uid;
39: char k_name[16];
40: } known[30];
41: int numknown;
42:
43: struct cmdtab {
44: char *c_name; /* command name */
45: int (*c_refresh)(); /* display refresh */
46: int (*c_fetch)(); /* sets up data structures */
47: int (*c_label)(); /* label display */
48: int (*c_init)(); /* initialize namelist, etc. */
49: WINDOW *(*c_open)(); /* open display */
50: int (*c_close)(); /* close display */
51: int (*c_cmd)(); /* display command interpreter */
52: char c_flags; /* see below */
53: };
54:
55: #define CF_INIT 0x1 /* been initialized */
56: #define CF_LOADAV 0x2 /* display w/ load average */
57:
58: struct cmdtab *curcmd;
59: struct cmdtab cmdtab[];
60: struct cmdtab *lookup();
61:
62: int kmem, mem, swap;
63: int naptime, col;
64:
65: long ntext, textp;
66: struct text *xtext;
67:
68: double lccpu;
69: double avenrun[3];
70:
71: char *kmemf, *memf, *swapf;
72: int hz, phz;
73: char **dr_name;
74: int dk_ndrive;
75: int *dk_select;
76: float *dk_mspw;
77: char c, *namp, hostname[32];
78:
79: int nports;
80: int nhosts;
81: int protos;
82: #define TCP 0x1
83: #define UDP 0x2
84:
85: struct pte *usrpt;
86: struct pte *Usrptma;
87:
88: WINDOW *wnd;
89: int CMDLINE;
90:
91: char *malloc(), *calloc(), *strncpy();
92: long getw();
Defined variables
c
defined in line
77; used 40 times
col
defined in line
63; used 48 times
curcmd
defined in line
58; used 18 times
dk_ndrive
defined in line
74; used 40 times
- in /usr/src/ucb/systat/disks.c line
47-57(8),
90,
201,
210
- in /usr/src/ucb/systat/iostat.c line
83-86(3),
103-109(4),
145,
160,
185,
204,
221,
234
- in /usr/src/ucb/systat/vmstat.c line
172-177(5),
287,
316,
485,
629-635(4),
666-669(4)
hz
defined in line
72; used 4 times
kmem
defined in line
62; used 70 times
- in /usr/src/ucb/systat/disks.c line
53-54(2),
99(2)
- in /usr/src/ucb/systat/fetch.c line
25-26(2),
112-113(2)
- in /usr/src/ucb/systat/iostat.c line
102-111(10)
- in /usr/src/ucb/systat/main.c line
76-77(2),
117-118(2),
163-164(2),
197-198(2)
- in /usr/src/ucb/systat/mbufs.c line
123-124(2)
- in /usr/src/ucb/systat/netstat.c line
140-146(4),
160-164(4)
- in /usr/src/ucb/systat/pigs.c line
184-185(2),
211-212(2),
225-226(2)
- in /usr/src/ucb/systat/swap.c line
215-216(2),
247-248(2),
258-259(2)
- in /usr/src/ucb/systat/vmstat.c line
203-204(2),
616-641(20)
kmemf
defined in line
71; used 3 times
known
defined in line
40; used 4 times
kprocp
defined in line
29; used 16 times
lccpu
defined in line
68; used 2 times
mem
defined in line
62; used 6 times
memf
defined in line
71; used 3 times
namp
defined in line
77; used 8 times
nproc
defined in line
28; used 16 times
ntext
defined in line
65; used 6 times
phz
defined in line
72; used 3 times
procp
defined in line
28; used 6 times
procs
defined in line
34; used 4 times
protos
defined in line
81; used 14 times
pt
defined in line
27; used 21 times
swap
defined in line
62; used 5 times
swapf
defined in line
71; used 3 times
textp
defined in line
65; used 2 times
usrpt
defined in line
85; used 4 times
xtext
defined in line
66; used 9 times
Defined struct's
cmdtab
defined in line
43; used 26 times
procs
defined in line
31; used 2 times
users
defined in line
37; used 2 times
Defined macros
TCP
defined in line
82; used 8 times
UDP
defined in line
83; used 8 times
Usage of this include