home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / sys / acct.h next >
C/C++ Source or Header  |  1993-10-19  |  1KB  |  53 lines

  1. /*
  2.  * Copyright (c) 1982, 1986 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)acct.h    7.1 (Berkeley) 6/4/86
  7.  *
  8.  */
  9.  
  10. /*
  11.  * Accounting structures;
  12.  * these use a comp_t type which is a 3 bits base 8
  13.  * exponent, 13 bit fraction ``floating point'' number.
  14.  * Units are 1/AHZ seconds.
  15.  */
  16. typedef    u_short comp_t;
  17.  
  18. struct    acct
  19. {
  20.     char    ac_comm[10];        /* Accounting command name */
  21.     comp_t    ac_utime;        /* Accounting user time */
  22.     comp_t    ac_stime;        /* Accounting system time */
  23.     comp_t    ac_etime;        /* Accounting elapsed time */
  24.     time_t    ac_btime;        /* Beginning time */
  25.     uid_t    ac_uid;            /* Accounting user ID */
  26.     gid_t    ac_gid;            /* Accounting group ID */
  27.     short    ac_mem;            /* average memory usage */
  28.     comp_t    ac_io;            /* number of disk IO blocks */
  29.     dev_t    ac_tty;            /* control typewriter */
  30.     char    ac_flag;        /* Accounting flag */
  31. };
  32.  
  33. #define    AFORK    0001        /* has executed fork, but no exec */
  34. #define    ASU    0002        /* used super-user privileges */
  35. #define    ACOMPAT    0004        /* used compatibility mode */
  36. #define    ACORE    0010        /* dumped core */
  37. #define    AXSIG    0020        /* killed by a signal */
  38.  
  39. /*
  40.  * 1/AHZ is the granularity of the data encoded in the various
  41.  * comp_t fields.  This is not necessarily equal to hz.
  42.  */
  43. #define AHZ 64
  44.  
  45. #ifdef KERNEL
  46. #ifdef    SYSACCT
  47. struct    acct    acctbuf;
  48. struct  vnode   *acctp;
  49. #else    SYSACCT
  50. #define    acct()
  51. #endif    SYSACCT
  52. #endif
  53.