.\" document ru_maxrss
.\" 2010-05-24, mtk, enhanced description of various fields
.\"
-.TH GETRUSAGE 2 2010-09-26 "Linux" "Linux Programmer's Manual"
+.TH GETRUSAGE 2 2014-05-10 "Linux" "Linux Programmer's Manual"
.SH NAME
getrusage \- get resource usage
.SH SYNOPSIS
.TP
.BR RUSAGE_THREAD " (since Linux 2.6.26)"
Return resource usage statistics for the calling thread.
+The
+.B _GNU_SOURCE
+feature test macro must be defined (before including
+.I any
+header file)
+in order to obtain the definition of this constant from
+.IR <sys/resource.h> .
.PP
The resource usages are returned in the structure pointed to by
.IR usage ,
structure (seconds plus microseconds).
.TP
.IR ru_maxrss " (since Linux 2.6.32)"
-This is the maximum resident set size used (in kilobytes). For
+This is the maximum resident set size used (in kilobytes).
+For
.BR RUSAGE_CHILDREN ,
this is the resident set size of the largest child, not the maximum
resident set size of the process tree.
.\" On some systems, this is the number of swaps out of physical memory.
.TP
.IR ru_inblock " (since Linux 2.6.22)"
-The number of times the file system had to perform input.
+The number of times the filesystem had to perform input.
.TP
.IR ru_oublock " (since Linux 2.6.22)"
-The number of times the file system had to perform output.
+The number of times the filesystem had to perform output.
.TP
.IR ru_msgsnd " (unmaintained)"
This field is currently unused on Linux.
SVr4, 4.3BSD.
POSIX.1-2001 specifies
.BR getrusage (),
-but only specifies the fields
+but specifies only the fields
.I ru_utime
and
.IR ru_stime .
.BR wait (2),
.BR wait4 (2),
.BR clock (3)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.