1833522 Members
2972 Online
110061 Solutions
New Discussion

Memory leakage

 
SOLVED
Go to solution
Shivkumar
Super Advisor

Memory leakage

Dear Sirs,

How to find out memory leakage due to applications or programs or shared objects by using hpux commands ?

Thanks,
Shiv
3 REPLIES 3
RAC_1
Honored Contributor

Re: Memory leakage

date;UNIX95= ps -C"your_prigrm_name" -o "vsz,args,pid" >> /tmp/mem.log

Run this through cron peridically. (for every 5 minutes or so)

If the values for vsz, go on increasing all the time, it may be memory leak problem.
If you have glance, there is alert defination for it. (I think /opt/perf/examples/adviser/proc_mem_leak)

Yuo can put that in alarmdef file and it will prompt you if it finds one.

Anil
There is no substitute to HARDWORK
Bill Hassell
Honored Contributor
Solution

Re: Memory leakage

All you can find is the size of the program and the size of any shared memory segments that the programs might use. There is no magic to finding a memory 'leak' because the program(s) may be working exactly as designed. As mentioned, you can use the extended ps command (the UNIX95 value) and record this into a file which you then monitor for growth. ps only shows local memory. Shared memory is monitored with ipcs -bmop and as before, you'll have to repeatedly store the results to look for growth. If you see a program that constantly grows, you have to talk to the programmer to see if this is a mistake or normal.


Bill Hassell, sysadmin