> Is there any system function which can tell me how much memory and cpu
> is being used by any process?
> It seems that in the /proc directory there are 2 files of this name,
> is this a standard thing or the format of the file differs from one
> system to another?
> Any help would be grately appreciated.
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
I have seen the /proc filesystem on Solaris and Linux. However, I know
this does not exist on AIX or BSD/OS. There is a system routine that
will get you CPU and memory usage (among other things) for a given
process. That routine is getrusage(). I think this is standard across
Unicies (UNIXes?). For more info, man getrusage.
Sometimes I sit and think...sometimes I just sit.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.