acct.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #ifndef _SYS_ACCT_H
  16. #define _SYS_ACCT_H 1
  17. #include <features.h>
  18. #define __need_time_t
  19. #include <time.h>
  20. __BEGIN_DECLS
  21. #define ACCT_COMM 16
  22. struct acct
  23. {
  24. char ac_comm[ACCT_COMM]; /* Accounting command name. */
  25. time_t ac_utime; /* Accounting user time. */
  26. time_t ac_stime; /* Accounting system time. */
  27. time_t ac_etime; /* Accounting elapsed time. */
  28. time_t ac_btime; /* Beginning time. */
  29. unsigned int ac_uid; /* Accounting user ID. */
  30. unsigned int ac_gid; /* Accounting group ID. */
  31. unsigned int ac_tty; /* Controlling tty. */
  32. /* Please note that the value of the `ac_tty' field, a device number,
  33. is encoded differently in the kernel and for the libc dev_t type. */
  34. char ac_flag; /* Accounting flag. */
  35. long int ac_minflt; /* Accounting minor pagefaults. */
  36. long int ac_majflt; /* Accounting major pagefaults. */
  37. long int ac_exitcode; /* Accounting process exitcode. */
  38. };
  39. enum
  40. {
  41. AFORK = 0001, /* Has executed fork, but no exec. */
  42. ASU = 0002, /* Used super-user privileges. */
  43. ACORE = 0004, /* Dumped core. */
  44. AXSIG = 0010 /* Killed by a signal. */
  45. };
  46. #define AHZ 100
  47. /* Switch process accounting on and off. */
  48. extern int acct (__const char *__filename) __THROW;
  49. __END_DECLS
  50. #endif /* sys/acct.h */