LKML Archive on
help / color / mirror / Atom feed
From: Sripathi Kodi <>
To: Michael Kerrisk <>
Cc: Andrew Morton <>,
	Roland McGrath <>,,,,
Date: Wed, 27 Feb 2008 17:11:55 +0530	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Friday 22 February 2008 23:13, Michael Kerrisk wrote:
> Sripathi Kodi wrote:
> > Hi Andrew,
> >
> > This adds the RUSAGE_THREAD option for the getrusage system call.
> > This is essentially Roland's patch from
> >, but the line about RUSAGE_LWP
> > line has been removed, as suggested by Ulrich and Christoph.
> >
> > Thanks,
> > Sripathi.
> >
> > This adds the RUSAGE_THREAD option for the getrusage system call.
> Sripathi,
> Could you write some small piece of text for the getrusage.2 man page
> that describes the intended behavior of RUSAGE_THREAD?


Please take a look at the following patch to getrusage.2. This is the first
time I have edited a manpage, so I hope I have done it correctly!

Also, the RUSAGE_THREAD patch is currently in -mm, but not in mainline
yet. Hoping that it will make it, I have put a line in the patch that it is 
supported from 2.6.25 onwards.


PS: I fixed spelling error in Ulrich's mail id in the CC list.

Signed-off-by: Sripathi Kodi <>

---	2008-02-27 17:00:57.000000000 +0530
+++ getrusage.2	2008-02-27 17:01:28.000000000 +0530
@@ -44,12 +44,22 @@ getrusage \- get resource usage
 .BR getrusage ()
 returns current resource usages, for a \fIwho\fP
-of either 
-The former asks for resources used by the current process,
-the latter for resources used by those of its children
+asks for resources used by the calling thread.
+asks for resources used by the current process, 
+which is the sum of resources used by all threads
+in the process.
+asks for resources used by those of its children
 that have terminated and have been waited for.
 .in +0.5i
@@ -130,6 +140,9 @@ Since Linux 2.6, 
 .I ru_nivcsw
 are also maintained.
+is supported only in Linux kernel versions 2.6.25 and above.
 .BR getrlimit (2),
 .BR times (2),

  reply	other threads:[~2008-02-27 11:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05  5:55 Sripathi Kodi
2008-02-22 17:43 ` Michael Kerrisk
2008-02-27 11:41   ` Sripathi Kodi [this message]
2008-03-10 15:33     ` Michael Kerrisk
  -- strict thread matches above, loose matches on Subject: below --
2008-01-17  8:27 [RFC] Per-thread getrusage Vinay Sridhar
2008-01-19  1:14 ` [PATCH] RUSAGE_THREAD Roland McGrath
2008-01-19  6:21   ` Ulrich Drepper
2008-01-21  9:55   ` Christoph Hellwig
2008-01-26  7:23   ` Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] RUSAGE_THREAD' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).