Process Memory utilisation

Hi,

Can anyone tell me the easiest way to dynamically monitor (via a function
call) the memory utilisation of a particular process?
The memory information fields (code and data memory) reported by “sin -P
processname format m” do not appear to be contained in the _psinfo
structure.
The only way I can think of to do this (at the moment) is to make a
“system( )” call to a script file which would pipe the sin output into a
temporary file for subsequent manipulation.

Am I completely mad? Please tell me I’m missing some simple feature or
system call?

Liam Power :sunglasses:

Liam Power (liam.power@hofmann-ge.com) wrote:
: Hi,

: Can anyone tell me the easiest way to dynamically monitor (via a function
: call) the memory utilisation of a particular process?
: The memory information fields (code and data memory) reported by “sin -P
: processname format m” do not appear to be contained in the _psinfo
: structure.
: The only way I can think of to do this (at the moment) is to make a
: “system( )” call to a script file which would pipe the sin output into a
: temporary file for subsequent manipulation.

: Am I completely mad? Please tell me I’m missing some simple feature or
: system call?

: Liam Power :sunglasses:

Go to www.parse.com/free and grab the source for sysmon. It monitors
top CPU and top memory usage – you’ll see how I did it :slight_smile:

Cheers,
-RK

Robert Krten, PARSE Software Devices; email my initials at parse dot com
Consulting, Systems Architecture / Design, Drivers, Training, QNX 4 & Neutrino
Check out our new QNX 4 and Neutrino (QRTP) books at http://www.parse.com/
Wanted PDP-8/9/10/11/12 Systems/documentation/spare parts! Will trade books!