vtimes.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Copyright (C) 1991, 1992, 1996, 1999 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_VTIMES_H
  16. #define _SYS_VTIMES_H 1
  17. #include <features.h>
  18. __BEGIN_DECLS
  19. /* This interface is obsolete; use `getrusage' instead. */
  20. /* Granularity of the `vm_utime' and `vm_stime' fields of a `struct vtimes'.
  21. (This is the frequency of the machine's power supply, in Hz.) */
  22. #define VTIMES_UNITS_PER_SECOND 60
  23. struct vtimes
  24. {
  25. /* User time used in units of 1/VTIMES_UNITS_PER_SECOND seconds. */
  26. int vm_utime;
  27. /* System time used in units of 1/VTIMES_UNITS_PER_SECOND seconds. */
  28. int vm_stime;
  29. /* Amount of data and stack memory used (kilobyte-seconds). */
  30. unsigned int vm_idsrss;
  31. /* Amount of text memory used (kilobyte-seconds). */
  32. unsigned int vm_ixrss;
  33. /* Maximum resident set size (text, data, and stack) (kilobytes). */
  34. int vm_maxrss;
  35. /* Number of hard page faults (i.e. those that required I/O). */
  36. int vm_majflt;
  37. /* Number of soft page faults (i.e. those serviced by reclaiming
  38. a page from the list of pages awaiting reallocation. */
  39. int vm_minflt;
  40. /* Number of times a process was swapped out of physical memory. */
  41. int vm_nswap;
  42. /* Number of input operations via the file system. Note: This
  43. and `ru_oublock' do not include operations with the cache. */
  44. int vm_inblk;
  45. /* Number of output operations via the file system. */
  46. int vm_oublk;
  47. };
  48. /* If CURRENT is not NULL, write statistics for the current process into
  49. *CURRENT. If CHILD is not NULL, write statistics for all terminated child
  50. processes into *CHILD. Returns 0 for success, -1 for failure. */
  51. extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW;
  52. __END_DECLS
  53. #endif /* sys/vtimes.h */