# 2.11BSD#431 - /usr/src/ucb/PORT/systat/systat.h

##### Variables

    CMDLINE           X
    Usrptma           X
    avenrun           X
    c                 X
    cmdtab            X
    col               X
    curcmd            X
    dk_mspw           X
    dk_ndrive         X
    dk_select         X
    dr_name           X
    hostname          X
    hz                X
    kmem              X
    kmemf             X
    known             X
    kprocp            X
    lccpu             X
    mem               X
    memf              X
    namp              X
    naptime           X
    nhosts            X
    nports            X
    nproc             X
    ntext             X
    numknown          X
    numprocs          X
    phz               X
    procp             X
    procs             X
    protos            X
    pt                X
    swap              X
    swapf             X
    textp             X
    usrpt             X
    xtext             X

##### Macros

    CF_INIT           X
    CF_LOADAV         X
    TCP               X
    UDP               X

##### struct's

    cmdtab            X
    p_times           X
    procs             X
    users             X

       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

CMDLINE defined in line 89; used 15 times

- in /usr/src/ucb/PORT/systat/cmds.c line 43, 50, 157, 168
- in /usr/src/ucb/PORT/systat/disks.c line 89
- in /usr/src/ucb/PORT/systat/keyboard.c line 25, 51, 75, 81
- in /usr/src/ucb/PORT/systat/main.c line 104, 188, 199, 214
- in /usr/src/ucb/PORT/systat/netcmds.c line 47
- in /usr/src/ucb/PORT/systat/vmstat.c line 330

Usrptma defined in line 86; used 3 times

- in /usr/src/ucb/PORT/systat/fetch.c line 111
- in /usr/src/ucb/PORT/systat/pigs.c line 181
- in /usr/src/ucb/PORT/systat/swap.c line 231

avenrun defined in line 69; used 15 times

- in /usr/src/ucb/PORT/systat/main.c line 164-168(4), 177-182(2), 195-200(6)
- in /usr/src/ucb/PORT/systat/vmstat.c line 383-385(3)

c defined in line 77; used 40 times

- in /usr/src/ucb/PORT/systat/cmds.c line 121, 127-135(5)
- in /usr/src/ucb/PORT/systat/main.c line 170-180(4)
- in /usr/src/ucb/PORT/systat/swap.c line 103-105(2), 120-124(2)
- in /usr/src/ucb/PORT/systat/vmstat.c line 313, 366-379(7), 484-487(3), 558, 564-574(4), 590-595(2), 674-678(3), 688-694(5)

cmdtab defined in line 59; used 3 times

- in /usr/src/ucb/PORT/systat/cmds.c line 51, 127
- in /usr/src/ucb/PORT/systat/cmdtab.c line 53

col defined in line 63; used 48 times

- in /usr/src/ucb/PORT/systat/cmds.c line 48-56(5), 168
- in /usr/src/ucb/PORT/systat/iostat.c line 141, 159-171(7), 199, 229, 236-237(2), 245-251(3), 266-276(4)
- in /usr/src/ucb/PORT/systat/keyboard.c line 24, 35, 54-85(20)
- in /usr/src/ucb/PORT/systat/main.c line 188

curcmd defined in line 58; used 18 times

- in /usr/src/ucb/PORT/systat/cmds.c line 84-96(4), 104, 110(2), 149
- in /usr/src/ucb/PORT/systat/main.c line 62, 105, 122-123(2), 146-151(2), 165-166(2), 184-185(2)

dk_mspw defined in line 76; used 12 times

- in /usr/src/ucb/PORT/systat/disks.c line 52-54(2), 61, 67, 91, 203
- in /usr/src/ucb/PORT/systat/iostat.c line 161, 186, 222, 235, 259
- in /usr/src/ucb/PORT/systat/vmstat.c line 682

dk_ndrive defined in line 74; never used
dk_select defined in line 75; used 12 times

- in /usr/src/ucb/PORT/systat/disks.c line 56, 62-66(2), 79-83(2)
- in /usr/src/ucb/PORT/systat/iostat.c line 146, 161, 186, 222, 235
- in /usr/src/ucb/PORT/systat/vmstat.c line 288, 486

dr_name defined in line 73; used 14 times

- in /usr/src/ucb/PORT/systat/disks.c line 55-65(5), 92, 130, 141, 173, 202-207(2)
- in /usr/src/ucb/PORT/systat/iostat.c line 167, 189
- in /usr/src/ucb/PORT/systat/vmstat.c line 290

hostname defined in line 77; used 3 times

- in /usr/src/ucb/PORT/systat/main.c line 116(2), 153

hz defined in line 72; used 4 times

- in /usr/src/ucb/PORT/systat/iostat.c line 215, 257
- in /usr/src/ucb/PORT/systat/main.c line 120
- in /usr/src/ucb/PORT/systat/vmstat.c line 169

kmem defined in line 62; used 70 times

- in /usr/src/ucb/PORT/systat/disks.c line 53-54(2), 99(2)
- in /usr/src/ucb/PORT/systat/fetch.c line 25-26(2), 112-113(2)
- in /usr/src/ucb/PORT/systat/iostat.c line 102-111(10)
- in /usr/src/ucb/PORT/systat/main.c line 76-77(2), 117-118(2), 163-164(2), 197-198(2)
- in /usr/src/ucb/PORT/systat/mbufs.c line 123-124(2)
- in /usr/src/ucb/PORT/systat/netstat.c line 140-146(4), 160-164(4)
- in /usr/src/ucb/PORT/systat/pigs.c line 184-185(2), 211-212(2), 225-226(2)
- in /usr/src/ucb/PORT/systat/swap.c line 215-216(2), 247-248(2), 258-259(2)
- in /usr/src/ucb/PORT/systat/vmstat.c line 203-204(2), 616-641(20)

kmemf defined in line 71; used 3 times

- in /usr/src/ucb/PORT/systat/main.c line 75-78(3)

known defined in line 40; used 4 times

- in /usr/src/ucb/PORT/systat/main.c line 126-127(2)
- in /usr/src/ucb/PORT/systat/pigs.c line 114, 125

kprocp defined in line 29; used 16 times

- in /usr/src/ucb/PORT/systat/pigs.c line 176-177(2), 200-202(3), 212-213(2)
- in /usr/src/ucb/PORT/systat/swap.c line 82-84(2), 226-227(2), 242-248(5)

lccpu defined in line 68; used 2 times

- in /usr/src/ucb/PORT/systat/main.c line 119
- in /usr/src/ucb/PORT/systat/pigs.c line 219

mem defined in line 62; used 6 times

- in /usr/src/ucb/PORT/systat/fetch.c line 117-120(2), 132-133(2)
- in /usr/src/ucb/PORT/systat/main.c line 82-83(2)

memf defined in line 71; used 3 times

- in /usr/src/ucb/PORT/systat/main.c line 81-84(3)

namp defined in line 77; used 8 times

- in /usr/src/ucb/PORT/systat/fetch.c line 37, 50-57(3)
- in /usr/src/ucb/PORT/systat/pigs.c line 118, 126, 132-137(2)

naptime defined in line 63; used 8 times

- in /usr/src/ucb/PORT/systat/cmds.c line 65, 73, 149, 169
- in /usr/src/ucb/PORT/systat/main.c line 64-66(3), 190

nhosts defined in line 80; used 8 times

- in /usr/src/ucb/PORT/systat/netcmds.c line 216-228(5), 240, 253
- in /usr/src/ucb/PORT/systat/netstat.c line 156

nports defined in line 79; used 8 times

- in /usr/src/ucb/PORT/systat/netcmds.c line 153-165(5), 177, 189
- in /usr/src/ucb/PORT/systat/netstat.c line 158

nproc defined in line 28; never used
ntext defined in line 65; never used
numknown defined in line 41; used 5 times

- in /usr/src/ucb/PORT/systat/main.c line 128
- in /usr/src/ucb/PORT/systat/pigs.c line 116, 124-130(3)

numprocs defined in line 35; used 14 times

- in /usr/src/ucb/PORT/systat/fetch.c line 42, 48-53(3)
- in /usr/src/ucb/PORT/systat/main.c line 131
- in /usr/src/ucb/PORT/systat/pigs.c line 62, 72-80(5), 87, 94, 109

phz defined in line 72; used 3 times

- in /usr/src/ucb/PORT/systat/main.c line 121
- in /usr/src/ucb/PORT/systat/vmstat.c line 169(2)

procp defined in line 28; used 6 times

- in /usr/src/ucb/PORT/systat/pigs.c line 172-173(2), 211
- in /usr/src/ucb/PORT/systat/swap.c line 220-221(2), 247

procs defined in line 34; used 4 times

- in /usr/src/ucb/PORT/systat/fetch.c line 41, 49
- in /usr/src/ucb/PORT/systat/main.c line 129-130(2)

protos defined in line 81; used 14 times

- in /usr/src/ucb/PORT/systat/netcmds.c line 92(2), 114, 122(2), 129-132(2), 191(2)
- in /usr/src/ucb/PORT/systat/netstat.c line 115, 133-137(3), 169

pt defined in line 27; used 21 times

- in /usr/src/ucb/PORT/systat/pigs.c line 58-61(2), 76-80(4), 91, 102-108(5), 182-183(2), 205-210(4), 223
- in /usr/src/ucb/PORT/systat/swap.c line 232-233(2)

swap defined in line 62; used 5 times

- in /usr/src/ucb/PORT/systat/fetch.c line 100-103(3)
- in /usr/src/ucb/PORT/systat/main.c line 88-89(2)

swapf defined in line 71; used 3 times

- in /usr/src/ucb/PORT/systat/main.c line 87-90(3)

textp defined in line 65; used 2 times

- in /usr/src/ucb/PORT/systat/swap.c line 218, 258

usrpt defined in line 85; used 4 times

- in /usr/src/ucb/PORT/systat/pigs.c line 178-180(2)
- in /usr/src/ucb/PORT/systat/swap.c line 228-230(2)

xtext defined in line 66; used 9 times

- in /usr/src/ucb/PORT/systat/swap.c line 62-64(3), 224-225(2), 253-259(4)

#### Defined struct's

cmdtab defined in line 43; used 26 times

- in line 58-60(6)
- in /usr/src/ucb/PORT/systat/cmds.c line 22(2), 79(2), 116-126(6), 141(2)
- in /usr/src/ucb/PORT/systat/cmdtab.c line 32(2), 53(2)
- in /usr/src/ucb/PORT/systat/main.c line 54-57(4)

p_times defined in line 21; used 18 times

- in /usr/src/ucb/PORT/systat/pigs.c line 53-54(4), 183(4), 192(2), 206(4)
- in /usr/src/ucb/PORT/systat/swap.c line 233(4)

procs defined in line 31; used 2 times

- in /usr/src/ucb/PORT/systat/fetch.c line 36(2)

users defined in line 37; used 2 times

- in /usr/src/ucb/PORT/systat/pigs.c line 55(2)

#### Defined macros

CF_INIT defined in line 55; used 3 times

- in /usr/src/ucb/PORT/systat/cmds.c line 98-100(2)
- in /usr/src/ucb/PORT/systat/main.c line 123

CF_LOADAV defined in line 56; used 8 times

- in /usr/src/ucb/PORT/systat/cmdtab.c line 35-44(4), 50
- in /usr/src/ucb/PORT/systat/main.c line 146, 166, 185

TCP defined in line 82; used 8 times

- in /usr/src/ucb/PORT/systat/netcmds.c line 92, 117-119(2), 129, 191(2)
- in /usr/src/ucb/PORT/systat/netstat.c line 115, 135

UDP defined in line 83; used 8 times

- in /usr/src/ucb/PORT/systat/netcmds.c line 92, 117-121(2), 132, 191
- in /usr/src/ucb/PORT/systat/netstat.c line 115, 137, 169

#### Usage of this include

systat.h used 13 times

- in /usr/src/ucb/PORT/systat/cmds.c line 15
- in /usr/src/ucb/PORT/systat/cmdtab.c line 11
- in /usr/src/ucb/PORT/systat/disks.c line 11
- in /usr/src/ucb/PORT/systat/fetch.c line 11
- in /usr/src/ucb/PORT/systat/iostat.c line 14
- in /usr/src/ucb/PORT/systat/keyboard.c line 15
- in /usr/src/ucb/PORT/systat/main.c line 17
- in /usr/src/ucb/PORT/systat/mbufs.c line 11
- in /usr/src/ucb/PORT/systat/netcmds.c line 14
- in /usr/src/ucb/PORT/systat/netstat.c line 14
- in /usr/src/ucb/PORT/systat/pigs.c line 15
- in /usr/src/ucb/PORT/systat/swap.c line 11
- in /usr/src/ucb/PORT/systat/vmstat.c line 15

Last modified: 1985-05-31 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1127 |