linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* getrusage vs /proc/pid/stat?
@ 2001-06-18  5:17 Dan Kegel
  2001-06-18 17:44 ` Pete Wyckoff
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2001-06-18  5:17 UTC (permalink / raw)
  To: linux-kernel

I'd like to monitor CPU, memory, and I/O utilization in a 
long-running multithreaded daemon under kernels 2.2, 2.4,
and possibly also Solaris (#ifdefs are ok).

getrusage() looked promising, and might even work for CPU utilization.
Dunno if it returns info for all child threads yet, haven't tried it.
In Linux, though, getrusage() doesn't return any info about RAM.

I know I can get the RSS and VSIZE under Linux by parsing /proc/pid/stat,
but was hoping for a faster interface (although I suppose a seek,
a read, and an ascii parse isn't *that* slow).  Is /proc/pid/stat
the only way to go under Linux to monitor RSS?
- Dan

-- 
"A computer is a state machine.
 Threads are for people who can't program state machines."
         - Alan Cox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-06-19 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-18  5:17 getrusage vs /proc/pid/stat? Dan Kegel
2001-06-18 17:44 ` Pete Wyckoff
2001-06-18 21:20   ` Dan Kegel
2001-06-18 23:34     ` J . A . Magallon
2001-06-19 15:05       ` Dan Kegel

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).