source: trunk/athena/bin/mon/mon.h @ 2

Revision 2, 2.5 KB checked in by dgg, 39 years ago (diff)
Initial revision
Line 
1/*
2 *      $Source: /afs/dev.mit.edu/source/repository/athena/bin/mon/mon.h,v $
3 *      $Author: dgg $
4 *      $Locker:  $
5 *      $Header: /afs/dev.mit.edu/source/repository/athena/bin/mon/mon.h,v 1.1 1984-12-13 12:01:51 dgg Exp $
6 */
7
8/*
9 *              M O N . H
10 *
11 *  Contains all includes and global defines/data needed by "mon"
12 */
13#include <stdio.h>
14#include <ctype.h>
15#include <nlist.h>
16#include <sys/types.h>
17#include <sys/vm.h>             /* virtual memory info struct */
18#include <sys/dk.h>             /* disk info struct */
19#include <sys/time.h>
20
21/*
22 * The main namelist entries.  This order MUST correspond to the
23 *  definition of namelist in main.
24 */
25#define X_DK_BUSY       0
26#define X_DK_MSPW       1
27#define X_HZ            2
28#define X_CP_TIME       3
29#define X_RATE          4
30#define X_TOTAL         5
31#define X_DEFICIT       6
32#define X_DK_XFER       7
33#define X_MBDINIT       8
34#define X_UBDINIT       9
35#define N_IFNET         10
36#define X_DK_TIME       11
37#define X_DK_WDS        12
38#define X_DK_SEEK       13
39#define X_TK_NIN        14
40#define X_TK_NOUT       15
41#define LOADAV          16
42#define X_CP_TIME2      17      /* 2nd CPU stats */
43#define X_SLAVESTART    18      /* 2nd cpu existance test */
44
45extern struct nlist namelist[];
46int intv;                       /* interval time */
47int numif;                      /* number of interfaces */
48int dualcpu;                    /* flag to indicate dual CPU */
49int kmem, hz;
50int deficit;
51double etime;
52double loadavg[4];
53
54/* drive names and numbers */
55char dr_name[DK_NDRIVE][10];
56char dr_unit[DK_NDRIVE];
57
58/*
59 *  Net Interfaces Data - consists of two structures:
60 *
61 *      nifinfo         contains the "static" data (names, addresses)
62 *                      and iterative data which does not consist
63 *                      of "running totals".
64 *
65 *      nifdata         The "dynamic" running total data.  Two copies,
66 *                      a "total" and "interval" are kept.
67 *
68 */
69#define MAXIF   10              /* ten interfaces maximum */
70
71struct  nifinfo {
72        char    name[16];       /* interface name */
73        int     outqlen;        /* output queue length */
74        /* add address, netname, etc. eventually */
75        /* also non totaling data */
76} nifinfo[MAXIF];
77
78struct  nifdata {
79        int     ipackets;       /* input packets */
80        int     ierrors;        /* input errors */
81        int     opackets;       /* output packets */
82        int     oerrors;        /* output errors */
83        int     collisions;
84} nifdat[MAXIF], niftot[MAXIF];
85
86/* state info */
87struct state {
88        long    cp_time[CPUSTATES];
89        long    cp_time2[CPUSTATES];    /* 2nd CPU */
90        long    dk_time[DK_NDRIVE];
91        long    dk_wds[DK_NDRIVE];
92        long    dk_seek[DK_NDRIVE];
93        long    dk_xfer[DK_NDRIVE];
94        float   dk_mspw[DK_NDRIVE];
95        long    tk_nin;
96        long    tk_nout;
97        struct  vmmeter Rate;
98        struct  vmtotal Total;
99} s, s1;
100
101#define rate            s.Rate
102#define total           s.Total
Note: See TracBrowser for help on using the repository browser.