Operating System - HP-UX
1834162 Members
2602 Online
110064 Solutions
New Discussion

Monitor memory regions of a particular process

 
HPUXnewbie
Occasional Contributor

Monitor memory regions of a particular process

Just wondering is it possible to use a script to capture the memory regions of a specific pid using glanceplus and output to a file every 5mins or so ? Any1 knows ?
3 REPLIES 3
Laurent Menase
Honored Contributor

Re: Monitor memory regions of a particular process

Hi,

yes you should look at the glance adviser mode
'glance -aos'
there are some configuration file examples in /opt/perf/examples/adviser
spex
Honored Contributor

Re: Monitor memory regions of a particular process

Hello,

Use 'ipcs'. In the following example, replace with the pid of interest.

$ ipcs -tam | awk '{if (NR==2 || $11 ~ ''){print}}' >> ipcs..out

You can schedule this command to run every five minutes via cron:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * ipcs ...

PCS
Jaime Bolanos Rojas.
Honored Contributor

Re: Monitor memory regions of a particular process

Hi,

You might also use this document, use the part called "Monitoring memory usage" :

ftp://eh:spear9@hprc.external.hp.com/memory.htm

Regards,

Jaime.
Work hard when the need comes out.