home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / acct.h next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.3 KB  |  77 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_ACCT_H
  11. #define _SYS_ACCT_H
  12.  
  13. #ident    "@(#)/usr/include/sys/acct.h.sl 1.1 4.0 12/08/90 3157 AT&T-USL"
  14. /*
  15.  * Accounting structures
  16.  */
  17.  
  18. typedef    ushort comp_t;        /* "floating point" */
  19.         /* 13-bit fraction, 3-bit exponent  */
  20.  
  21. /* SVR4 acct structure */
  22. struct    acct
  23. {
  24.     char    ac_flag;        /* Accounting flag */
  25.     char    ac_stat;        /* Exit status */
  26.     uid_t    ac_uid;            /* Accounting user ID */
  27.     gid_t    ac_gid;            /* Accounting group ID */
  28.     dev_t    ac_tty;            /* control typewriter */
  29.     time_t    ac_btime;        /* Beginning time */
  30.     comp_t    ac_utime;        /* acctng user time in clock ticks */
  31.     comp_t    ac_stime;        /* acctng system time in clock ticks */
  32.     comp_t    ac_etime;        /* acctng elapsed time in clock ticks */
  33.     comp_t    ac_mem;            /* memory usage */
  34.     comp_t    ac_io;            /* chars transferred */
  35.     comp_t    ac_rw;            /* blocks read or written */
  36.     char    ac_comm[8];        /* command name */
  37. };    
  38.  
  39. /* Account commands will use this header to read SVR3
  40. ** accounting data files.
  41. */
  42.  
  43. struct    o_acct
  44. {
  45.     char    ac_flag;        /* Accounting flag */
  46.     char    ac_stat;        /* Exit status */
  47.     o_uid_t    ac_uid;            /* Accounting user ID */
  48.     o_gid_t    ac_gid;            /* Accounting group ID */
  49.     o_dev_t    ac_tty;            /* control typewriter */
  50.     time_t    ac_btime;        /* Beginning time */
  51.     comp_t    ac_utime;        /* acctng user time in clock ticks */
  52.     comp_t    ac_stime;        /* acctng system time in clock ticks */
  53.     comp_t    ac_etime;        /* acctng elapsed time in clock ticks */
  54.     comp_t    ac_mem;            /* memory usage */
  55.     comp_t    ac_io;            /* chars transferred */
  56.     comp_t    ac_rw;            /* blocks read or written */
  57.     char    ac_comm[8];        /* command name */
  58. };    
  59.  
  60. extern    struct    acct    acctbuf;
  61. extern    struct    vnode    *acctp;        /* vnode of accounting file */
  62.  
  63. #if !defined(_KERNEL)
  64. #if defined(__STDC__)
  65. extern int acct(const char *);
  66. #else
  67. extern int acct();
  68. #endif
  69. #endif /* !defined(_KERNEL) */
  70.  
  71. #define    AFORK    01        /* has executed fork, but no exec */
  72. #define    ASU    02        /* used super-user privileges */
  73. #define    ACCTF    0300        /* record type: 00 = acct */
  74. #define AEXPND    040        /* expanded acct structure */
  75.  
  76. #endif    /* _SYS_ACCT_H */
  77.