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 / elog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.4 KB  |  53 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:elog.h    1.3"
  10.  
  11. /*
  12.  * "True" major device numbers. These correspond
  13.  * to standard positions in the configuration
  14.  * table, but are used for error logging
  15.  * purposes only.
  16.  */
  17.  
  18. #define CNTL    1
  19. #define SYS    2
  20. #define CAC    3
  21. #define PF    4
  22.  
  23. /*
  24.  * IO statistics are kept for each physical unit of each
  25.  * block device (within the driver). Primary purpose is
  26.  * to establish a guesstimate of error rates during
  27.  * error logging.
  28.  */
  29.  
  30. struct iostat {
  31.     long    io_ops;        /* number of read/writes */
  32.     long    io_misc;    /* number of "other" operations */
  33.     long    io_qcnt;    /* number of jobs assigned to drive */
  34.     ushort io_unlog;    /* number of unlogged errors */
  35. };
  36.  
  37. /*
  38.  * structure for system accounting
  39.  */
  40. struct iotime {
  41.     struct iostat ios;
  42.     long    io_bcnt;    /* total blocks transferred */
  43.     time_t    io_resp;    /* total block response time */
  44.     time_t    io_act;        /* total drive active time (cumulative utilization) */
  45.     int    io_pad;        /* round size to 2^n */
  46. };
  47. #define    io_cnt    ios.io_ops
  48. #define io_qc ios.io_qcnt
  49. /* drive utilization times can be calculated by system software as follows */
  50.  
  51. /* Average drive utilization = (io_cact/io_elapt) */
  52. /* Average drive utilization for last interval = (io_liact/io_intv) */
  53.