|
|
1.1 ! root 1: .TH ACCT 5 ! 2: .CT 1 sa_nonmortals ! 3: .SH NAME ! 4: acct \- execution accounting file ! 5: .SH SYNOPSIS ! 6: .B #include <sys/types.h> ! 7: .br ! 8: .B #include <sys/acct.h> ! 9: .SH DESCRIPTION ! 10: .IR Acct (2) ! 11: causes an entry to be appended to an accounting file ! 12: for each process that terminates. ! 13: The layout of an accounting file entry, as given in ! 14: .BR <sys/acct.h> , ! 15: is ! 16: .PP ! 17: .EX ! 18: .ta \w'typedef 'u +\w'ASTINY 'u +\w'ac_comm[10]; 'u ! 19: typedef unsigned short comp_t; ! 20: ! 21: struct acct ! 22: { ! 23: char ac_comm[10]; /* command name */ ! 24: comp_t ac_utime; /* user time */ ! 25: comp_t ac_stime; /* system time */ ! 26: comp_t ac_etime; /* elapsed time */ ! 27: time_t ac_btime; /* beginning time */ ! 28: short ac_uid; /* user ID */ ! 29: short ac_gid; /* group ID */ ! 30: short ac_mem; /* average memory usage */ ! 31: comp_t ac_io; /* number of disk IO blocks */ ! 32: dev_t ac_tty; /* control typewriter */ ! 33: char ac_flag; /* flag */ ! 34: }; ! 35: .EE ! 36: .PP ! 37: Values in ! 38: .BR ac_flag : ! 39: .PP ! 40: .EX ! 41: #define AFORK 01 /* has executed fork, but no exec */ ! 42: #define ASU 02 /* used super-user privileges */ ! 43: .EE ! 44: .PP ! 45: If the process does an ! 46: .IR exec (2), ! 47: the first 10 characters of the filename appear in ! 48: .L ac_comm. ! 49: .PP ! 50: The type ! 51: .B comp_t ! 52: counts 60- or 50-cycle clock ticks in a private ! 53: floating-point format: a ! 54: three-bit base-8 exponent and a 13-bit unsigned mantissa. ! 55: Thus the number of clock ticks that a process ran is expressed by ! 56: .IR (ac_etime&017777)\^<<\^((ac_etime>>13)&03) . ! 57: The beginning time, ! 58: .BR ac_btime , ! 59: is recorded in the format of ! 60: .IR time (2). ! 61: .SH SEE ALSO ! 62: .IR acct (2), ! 63: .IR sa (8)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.