acct.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _SYS_ACCT_H
  15. #define _SYS_ACCT_H 1
  16. #include <features.h>
  17. #define __need_time_t
  18. #include <time.h>
  19. __BEGIN_DECLS
  20. #define ACCT_COMM 16
  21. struct acct
  22. {
  23. char ac_comm[ACCT_COMM]; /* Accounting command name. */
  24. time_t ac_utime; /* Accounting user time. */
  25. time_t ac_stime; /* Accounting system time. */
  26. time_t ac_etime; /* Accounting elapsed time. */
  27. time_t ac_btime; /* Beginning time. */
  28. unsigned int ac_uid; /* Accounting user ID. */
  29. unsigned int ac_gid; /* Accounting group ID. */
  30. unsigned int ac_tty; /* Controlling tty. */
  31. /* Please note that the value of the `ac_tty' field, a device number,
  32. is encoded differently in the kernel and for the libc dev_t type. */
  33. char ac_flag; /* Accounting flag. */
  34. long int ac_minflt; /* Accounting minor pagefaults. */
  35. long int ac_majflt; /* Accounting major pagefaults. */
  36. long int ac_exitcode; /* Accounting process exitcode. */
  37. };
  38. enum
  39. {
  40. AFORK = 0001, /* Has executed fork, but no exec. */
  41. ASU = 0002, /* Used super-user privileges. */
  42. ACORE = 0004, /* Dumped core. */
  43. AXSIG = 0010 /* Killed by a signal. */
  44. };
  45. #define AHZ 100
  46. /* Switch process accounting on and off. */
  47. extern int acct (const char *__filename) __THROW;
  48. __END_DECLS
  49. #endif /* sys/acct.h */