in reply to get memory usage

It's not a very portable problem, unfortunately.

Check out Proc::ProcessTable; it will give you memory usage for different platforms. But even with that, the key for memory usage changes on many oses.

Your best bet is probably using /proc, as you are now; that's fairly portable these days, at least on Unices. Not MacOSX, though. (Edit: As sauoq points out below, proc's internals aren't portable, though.)

For an example of using proc on another OS, check out Solaris::ProcFS.
--
Mike

Replies are listed 'Best First'.
Re: Re: get memory usage
by sauoq (Abbot) on Aug 24, 2002 at 01:03 UTC
    Your best bet is probably using /proc, as you are now; that's fairly portable these days, at least on Unices.

    Unfortunately, that just isn't true. Even among systems that have /proc, the format is often very different.

    -sauoq
    "My two cents aren't worth a dime.";