tahoe only
[unix-history] / usr / src / usr.bin / systat / systat.h
CommitLineData
07ed1e09
KM
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 *
e2d0fe21 6 * @(#)systat.h 5.2 (Berkeley) %G%
07ed1e09 7 */
b50325b5 8
833d578b
SL
9#include <netdb.h>
10#include <nlist.h>
11#include <signal.h>
b50325b5 12#include <curses.h>
b50325b5 13
833d578b
SL
14#include <sys/param.h>
15#include <sys/file.h>
e2d0fe21 16#include <sys/dkstat.h>
833d578b
SL
17
18#include <netinet/in.h>
19#include <arpa/inet.h>
20
b50325b5
SL
21struct 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;
855ff304
KM
28long nproc, procp;
29struct proc *kprocp;
b50325b5
SL
30
31struct procs {
32 int pid;
33 char cmd[16];
34} procs[200];
35int numprocs;
36
37struct users {
38 int k_uid;
39 char k_name[16];
40} known[30];
855ff304 41int numknown;
b50325b5 42
d830bff6
SL
43struct 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 */
855ff304 51 int (*c_cmd)(); /* display command interpreter */
9c0c7319 52 char c_flags; /* see below */
d830bff6
SL
53};
54
9c0c7319
SL
55#define CF_INIT 0x1 /* been initialized */
56#define CF_LOADAV 0x2 /* display w/ load average */
57
d830bff6
SL
58struct cmdtab *curcmd;
59struct cmdtab cmdtab[];
4fefc2e5 60struct cmdtab *lookup();
d830bff6 61
855ff304
KM
62int kmem, mem, swap;
63int naptime, col;
64
65long ntext, textp;
d830bff6 66struct text *xtext;
855ff304 67
b50325b5 68double lccpu;
9c0c7319 69double avenrun[3];
855ff304
KM
70
71char *kmemf, *memf, *swapf;
833d578b
SL
72int hz, phz;
73char **dr_name;
74int dk_ndrive;
75int *dk_select;
76float *dk_mspw;
855ff304
KM
77char c, *namp, hostname[32];
78
833d578b
SL
79int nports;
80int nhosts;
81int protos;
82#define TCP 0x1
83#define UDP 0x2
84
b50325b5
SL
85struct pte *usrpt;
86struct pte *Usrptma;
87
88WINDOW *wnd;
855ff304
KM
89int CMDLINE;
90
91char *malloc(), *calloc(), *strncpy();
92long getw();