On Tue, 10 Jul 2007, Matthew Gregan wrote:

There is a bunch of really useful information in /proc/<PID>, some of which
is parsed and displayed by tools from the psutils package, some of which
there are ad-hoc tools to deal with, and some of which isn't used by
userspace (yet).

That name also tricked me. But alas, the ps in psutils is PostScript.
There may be a different package that has the desired functionality,
but psutils isn't it.


One of the more useful recent additions is
/proc/<PID>/smaps, which is useful for examining the address space of a
process to get a picture of the real memory use.

That's one of the nice things about the stopper program, you can glean them all.

* Looks up command on path.

Just let execvp(3) (or another exec.*p variant) do the work.  Duplicating
the system/shell path search code would be a waste of effort.

As I say, it's one of those programs one can write in literally 5
minutes (copy & tweak the example code from the info pages)... It's
just that I feel so silly doing so. I'm sure the functionality exists
somewhere on my disk already.

You never specified which fields you're interested in.  If you really want
everything that time(1) promised to tell you, you're out of luck.  If you're
interested in collecting statistics for specific things, there are almost
definitely good tools already available to help you out.

I'm a tad pragmatic on this front.... I want whatever stats I can get
from Linux that will allow me to compare the resource consumption of
two algorithms.

At one stage in the history of me /usr/bin/time was the really quick
and nifty way of doing that. Alas, I need to find others. So anything
more specific on those good tools you mention?

Thanks!


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : [EMAIL PROTECTED]
New Zealand

Reply via email to