[Nottingham] Process CPU and memory usage?

Camilo Mesias camilo at mesias.co.uk
Mon Sep 22 10:40:34 UTC 2008


> From within a program, at intervals how can I find out how much CPU and
> how much memory has been used so far for all child/forked processes?

Take a look at getrusage(), maybe consider writing a wrapper program
that does the stats for you (then you can reuse it directly instead of
pasting the same code into the next project)



More information about the Nottingham mailing list