[Nottingham] Process CPU and memory usage?
Martin
martin at ml1.co.uk
Mon Sep 22 20:06:08 UTC 2008
Peter Chang wrote:
> On Mon, 22 Sep 2008, Camilo Mesias wrote:
> [...]
>> Have you considered doing something with top, maybe configuring it to
>> run in batch mode at an interval of your choice? Top reads /proc, and
>> it is fairly costly (but you may be able to mitigate by having a
>> longer interval)
>
> Isn't ps(1) a better option than top(1)? It has an option to take a parent
> PID too!
Or even use pstree...
So how do you get 'realtime' process stats? (Of /currently/ running
processes.)
I can't help but think that this is one of those "it must have been done
already"...
Sorry, but the top/ps/pstree and parse their output seems to be rather
expensively clunky. Then also, scanning through /proc is also
expensively clunky...
Any other ideas?
Cheers,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list