At 2007-07-12T09:18:34+1200, John Carter wrote:
> 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.

Ah, I always confuse the names of these two packages.  I was referring to
procps.

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

Some of the information in /proc/<PID> is not cummulative.  You need to poll
these while the program runs, instead.  smaps is a good example of one of
these.

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

Uh huh...

(meanwhile this thread has already consumed more time than the purported 5
minute implementation would have taken)

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

Algorithms? Read the implementation, it should be relatively easy to predict
how they will behave time and space wise if you understand them.  Once
you've done that, maybe you want to look at real numbers from runtime
experiments to confirm your predictions.

> 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?

A quick list of useful tools for performance/inspection work is:

CPU: oprofile, cachegrind
Memory: massif, mtrace
Kernel, syscalls, I/O: systemtap, strace -T, blktrace

Frysk is intended to handle a larger set of monitoring tasks, but it's still
in development and probably of limited use (in its current state) to people
unfamiliar with it.

There are lots of others, most of them for even more specific tasks.

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                    [EMAIL PROTECTED]

Reply via email to