vtimes.h 2.4 KB

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