home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / sysinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  5.3 KB  |  183 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:sysinfo.h    1.3.1.1"
  10.  
  11. /*
  12.  *    System Information.
  13.  */
  14.  
  15. struct sysinfo {
  16.     time_t    cpu[5];
  17. #define    CPU_IDLE    0
  18. #define    CPU_USER    1
  19. #define    CPU_KERNEL    2
  20. #define    CPU_WAIT    3
  21. #define CPU_SXBRK    4
  22.     time_t    wait[3];
  23. #define    W_IO    0
  24. #define    W_SWAP    1
  25. #define    W_PIO    2
  26.     long    bread;
  27.     long    bwrite;
  28.     long    lread;
  29.     long    lwrite;
  30.     long    phread;
  31.     long    phwrite;
  32.     long    swapin;
  33.     long    swapout;
  34.     long    bswapin;
  35.     long    bswapout;
  36.     long    pswitch;
  37.     long    syscall;
  38.     long     remcall;    /* REMOTE: remote call */
  39.     long    fileop;        /* REMOTE: remote fileop */
  40.     long    serve;        /* REMOTE: remote server */
  41.     long    sysread;
  42.     long    syswrite;
  43.     long    sysfork;
  44.     long    sysexec;
  45.     long    runque;
  46.     long    runocc;
  47.     long    swpque;
  48.     long    swpocc;
  49.     long    iget;
  50.     long    namei;
  51.     long    dirblk;
  52.     long    readch;
  53.     long    writech;
  54.     long    rcvint;
  55.     long    xmtint;
  56.     long    mdmint;
  57.     long    rawch;
  58.     long    canch;
  59.     long    outch;
  60.     long    msg;
  61.     long    sema;
  62.     long    pnpfault;
  63.     long    wrtfault;
  64. };
  65.  
  66. extern struct sysinfo sysinfo;
  67.  
  68. struct syswait {
  69.     short    iowait;
  70.     short    swap;
  71.     short    physio;
  72. };
  73.  
  74. struct dinfo {
  75.             /* ELEMENT FOR sar -Du */
  76.     time_t    serve;        /* ticks in serve() since boot */
  77.             /* ELEMENTS FOR sar -Dc */
  78.     long    isyscall;    /* # of incoming syscalls since boot */
  79.     long    isysread;    /* # of incoming read's since boot */
  80.     long    ireadch;    /* char's read by incoming read's */
  81.     long    isyswrite;    /* # of incoming write's since boot */
  82.     long    iwritech;    /* char's written by incoming writes */
  83.     long    isysexec;    /* # of incoming exec's since boot */
  84.     long    osyscall;    /* # of outgoing syscalls since boot */
  85.     long    osysread;    /* # of outgoing read's since boot */
  86.     long    oreadch;    /* char's read by outgoing read's */
  87.     long    osyswrite;    /* # of outgoing write's since boot */
  88.     long    owritech;    /* char's written by outgoing writes */
  89.     long    osysexec;    /* # of outgoing exec's since boot */
  90.             /* ELEMENTS FOR sar -S*/
  91.     long    nservers;    /* sum of all servers since boot */
  92.     long    srv_que;    /* sum of server Q lgth since boot */
  93.     long    srv_occ;    /* ticks server Q found occupied */
  94.     long    rcv_que;    /* sum of receive Q lgth since boot */
  95.     long    rcv_occ;    /* clock ticks receive Q occupied */
  96. };
  97. struct rcinfo {
  98.     long    cbread;        /* read blocks sent to remote server*/
  99.                     /* (not found in cache) */
  100.     long    cbwrite;    /* write blocks not found in local cache*/
  101.     long    clread;        /* total blocks in remote read */
  102.     long    clwrite;    /* total blocks in remote write */
  103.     long    snd_dis;    /* cache disable messages sent (server) */
  104.     long    snd_msg;    /* total RFS messages sent */
  105.     long    rcv_dis;    /* cache disable messages received (client) */
  106.     long    rcv_msg;    /* total RFS messages received */
  107.     long    dis_bread;    /* # of per-file blocks flushed from cache*/
  108.     long    blk_inval;    /* # of per-file blocks flushed from cache*/
  109.     long    inval;        /* # of per-file cache flushes */
  110. };
  111. extern struct dinfo dinfo;
  112. extern struct rcinfo rcinfo;
  113. extern    int minserve;        /* DU tunable: sever low water mark */
  114. extern    int maxserve;        /* DU tunable: sever high water mark */
  115. extern    int nservers;        /* total servers in system */
  116. extern    int idleserver;        /* idle servers in system */
  117. extern    int msglistcnt;        /* receive descriptors in msg queue */
  118.  
  119.  
  120. struct minfo {
  121.     unsigned long     freemem[2];     /* freemem in pages */
  122.                     /* "double" long format    */
  123.                     /* freemem[0] least significant */
  124.     long    freeswap;    /* free swap space */
  125.     long    vfault;      /* translation fault */
  126.     long    demand;        /*  demand zero and demand fill pages */
  127.     long    swap;        /*  pages on swap */
  128.     long    cache;        /*  pages in cache */
  129.     long    file;        /*  pages on file */
  130.     long    pfault;        /* protection fault */
  131.     long    cw;        /*  copy on write */
  132.     long    steal;        /*  steal the page */
  133.     long    freedpgs;    /* pages are freed */
  134.     long    vfpg;         /* pages are freed by vhand*/
  135.     long    sfpg;        /* pages are freed by sched*/
  136.     long    vspg;        /* pages are freed/swapped by vhand */
  137.     long    sspg;        /* pages are freed/swapped by sched */
  138.     long    unmodsw;    /* getpages finds unmodified pages on swap */
  139.     long    unmodfl;    /* getpages finds unmodified pages in file */ 
  140. #ifdef    i386            /* psk */
  141.     long    psoutok;        /* swapping out a process */
  142.     long    psinfail;       /* swapping in a process failed */
  143.     long    psinok;         /* swapping in a process succeeded */
  144.     long    rsout;          /* swapping out a region */
  145.     long    rsin;           /* swapping in a region */
  146. #endif
  147. };
  148.  
  149. extern struct minfo minfo;
  150. extern struct syswait syswait;
  151.  
  152. struct syserr {
  153.     long    inodeovf;
  154.     long    fileovf;
  155.     long    textovf;
  156.     long    procovf;
  157. };
  158.  
  159. extern struct syserr syserr;
  160.  
  161. struct shlbinfo {
  162.     long    shlbs;        /* Max # of libs a process can link in    */
  163.                 /*   at one time.            */
  164.     long    shlblnks;    /* # of times processes that have used    */
  165.                 /*   static shared libraries.        */
  166.     long    shlbovf;    /* # of processes needed more shlibs    */
  167.                 /*   than the system imposed limit.    */
  168.     long    shlbatts;    /* # of times processes have attached    */
  169.                 /*   run time libraries.        */
  170. };
  171.  
  172. extern struct shlbinfo shlbinfo;
  173.  
  174. struct bpbinfo {
  175.     long    usr;        /* usr time for the co-processor    */
  176.     long    sys;        /* system time for the co-processor    */
  177.     long    idle;        /* idle time for the co-processor    */
  178.     long    syscall;    /* # of system calls since boot on the  */
  179.                 /*    co-processor            */
  180. };
  181.  
  182. extern struct bpbinfo bpbinfo[];
  183.