Skip to contentSkip to conversation

getrusage.2: Description of maintained fields

PATCH New Mark Hills 1 participant 3 messages Nov 28, 2009 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Mark Hills

author
#0 lore raw

PATCH 1/3 getrusage.2: Description of maintained fields

These descriptions are taken from NetBSD 5.0's getrusage(2).

---
 man2/getrusage.2 |   69 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 51 insertions(+), 18 deletions(-)
man2/getrusage.2 +51 -18
index 0f2ed4a..b5564fc 100644
@@ -89,6 +89,57 @@ struct rusage {
 };
 .fi
 .in
+.PP
+Not all fields are completed; unmaintained fields are set to zero by
+the kernel. The fields are interpreted as follows:
+.TP
+.I ru_utime
+the total amount of time spent executing in user mode.
+.TP
+.I ru_stime
+the total amount of time spent in the system executing on behalf
+of the process(es).
+.TP
+.IR ru_maxrss " (unmaintained)"
+.TP
+.IR ru_ixrss " (unmaintained)"
+.TP
+.IR ru_idrss " (unmaintained)"
+.TP
+.IR ru_isrss " (unmaintained)"
+.TP
+.I ru_minflt
+the number of page faults serviced without any I/O activity; here
+I/O activity is avoided by \*(lqreclaiming\*(rq a page frame from
+the list of pages awaiting reallocation.
+.TP
+.I ru_majflt
+the number of page faults serviced that required I/O activity.
+.TP
+.IR ru_nswap  " (unmaintained)"
+.TP
+.IR ru_inblock " (since Linux 2.6.22)"
+the number of times the file system had to perform input.
+.TP
+.IR ru_oublock " (since Linux 2.6.22)"
+the number of times the file system had to perform output.
+.TP
+.IR ru_msgsnd " (unmaintained)"
+.TP
+.IR ru_msgrcv " (unmaintained)"
+.TP
+.IR ru_nsignals " (unmaintained)"
+.TP
+.IR ru_nvcsw " (since Linux 2.6)"
+the number of times a context switch resulted due to a process
+voluntarily giving up the processor before its time slice was
+completed (usually to await availability of a resource).
+.TP
+.IR ru_nivcsw " (since Linux 2.6)"
+the number of times a context switch resulted due to a higher
+priority process becoming runnable or because the current process
+exceeded its time slice.
+.PP
 .SH "RETURN VALUE"
 On success, zero is returned.
 On error, \-1 is returned, and
@@ -140,24 +191,6 @@ This non-conformance is rectified in Linux 2.6.9 and later.
 .LP
 The structure definition shown at the start of this page
 was taken from 4.3BSD Reno.
-Not all fields are meaningful under Linux.
-In Linux 2.4 only the fields
-.IR ru_utime ,
-.IR ru_stime ,
-.IR ru_minflt ,
-and
-.I ru_majflt
-are maintained.
-Since Linux 2.6,
-.I ru_nvcsw
-and
-.I ru_nivcsw
-are also maintained.
-Since Linux 2.6.22,
-.I ru_inblock
-and
-.I ru_oublock
-are also maintained.
 
 See also the description of
 .IR /proc/PID/stat
Signature · 6 lines
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1259416637-8118-1-git-send-email-mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org

author
#2 lore raw

PATCH 2/3 getrusage.2: Add ru_maxrss

See kernel commit 1f10206.

---
 man2/getrusage.2 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
man2/getrusage.2 +5 -1
index b5564fc..a35d0a3 100644
@@ -100,7 +100,11 @@ the total amount of time spent executing in user mode.
 the total amount of time spent in the system executing on behalf
 of the process(es).
 .TP
-.IR ru_maxrss " (unmaintained)"
+.IR ru_maxrss " (since Linux 2.6.32)"
+the maximum resident set size used (in kilobytes). For
+.B RUSAGE_CHILDREN
+this is the resident set size of the largest child, not the maximum
+resident set size of the process tree.
 .TP
 .IR ru_ixrss " (unmaintained)"
 .TP
Signature · 6 lines
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1259416637-8118-2-git-send-email-mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org

author
#4 lore raw

PATCH 3/3 getrusage.2: Bump revision

---
 man2/getrusage.2 |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
man2/getrusage.2 +3 -1
index a35d0a3..0765e7d 100644
@@ -32,8 +32,10 @@
 .\"	when SIGCHLD is being ignored is fixed in 2.6.9.
 .\" 2008-02-22, Sripathi Kodi <[email protected]>: Document RUSAGE_THREAD
 .\" 2008-05-25, mtk, clarify RUSAGE_CHILDREN + other clean-ups.
+.\" 2009-11-28, Mark Hills <[email protected]>: Description of fields,
+.\"     document ru_maxrss
 .\"
-.TH GETRUSAGE 2 2009-08-25 "Linux" "Linux Programmer's Manual"
+.TH GETRUSAGE 2 2009-11-28 "Linux" "Linux Programmer's Manual"
 .SH NAME
 getrusage \- get resource usage
 .SH SYNOPSIS
Signature · 6 lines
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html