Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Jul 2008 15:12:18 -0500
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        freebsd-hackers@freebsd.org
Subject:   time used by a thread
Message-ID:  <486D32A2.6030608@math.missouri.edu>

next in thread | raw e-mail | index | archive | help
I want to use getrusage to see how much time a program is using.  But 
this is a multithreaded program, and I just want the time taken by that 
particular thread!

I know this info must be available somewhere, because top -H seems to 
provide it.  But getrusage seems to give the total rusage for the whole 
program, not just the thread.

Any ideas?  I would especially appreciate a portable solution that works 
for OS other than FreeBSD (e.g. linux, etc as well).

I tried "apropos thread | grep usage".




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?486D32A2.6030608>