home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / elog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.6 KB  |  58 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_ELOG_H
  11. #define _SYS_ELOG_H
  12.  
  13. #ident    "@(#)/usr/include/sys/elog.h.sl 1.1 4.0 12/08/90 43598 AT&T-USL"
  14. /*
  15.  * "True" major device numbers. These correspond
  16.  * to standard positions in the configuration
  17.  * table, but are used for error logging
  18.  * purposes only.
  19.  */
  20.  
  21. #define CNTL    1
  22. #define SYS    2
  23. #define CAC    3
  24. #define PF    4
  25.  
  26. /*
  27.  * IO statistics are kept for each physical unit of each
  28.  * block device (within the driver). Primary purpose is
  29.  * to establish a guesstimate of error rates during
  30.  * error logging.
  31.  */
  32.  
  33. struct iostat {
  34.     long    io_ops;        /* number of read/writes */
  35.     long    io_misc;    /* number of "other" operations */
  36.     long    io_qcnt;    /* number of jobs assigned to drive */
  37.     ushort io_unlog;    /* number of unlogged errors */
  38. };
  39.  
  40. /*
  41.  * structure for system accounting
  42.  */
  43. struct iotime {
  44.     struct iostat ios;
  45.     long    io_bcnt;    /* total blocks transferred */
  46.     clock_t    io_resp;    /* total block response time */
  47.     clock_t    io_act;        /* total drive active time (cumulative utilization) */
  48.     int    io_pad;        /* round size to 2^n */
  49. };
  50. #define    io_cnt    ios.io_ops
  51. #define io_qc ios.io_qcnt
  52. /* drive utilization times can be calculated by system software as follows */
  53.  
  54. /* Average drive utilization = (io_cact/io_elapt) */
  55. /* Average drive utilization for last interval = (io_liact/io_intv) */
  56.  
  57. #endif    /* _SYS_ELOG_H */
  58.