The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Looking for memory leaks freeware tools umen UNIX and Linux Applications 3 01-04-2008 08:39 PM
Find memory leaks shell script ??? nano2 Shell Programming and Scripting 5 06-20-2007 09:46 AM
strange problem with memory leaks shriashishpatil UNIX for Advanced & Expert Users 1 08-10-2006 04:47 AM
Tool for finding memory leaks sarwan High Level Programming 1 11-15-2005 08:34 AM
Memory leaks on HP-UX 11i gimhan90 HP-UX 1 09-22-2005 07:41 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-17-2002
Registered User
 

Join Date: Oct 2001
Location: Bangalore
Posts: 95
memory leaks

Hi!! Experts,

Any ideas how to check for the memory leaks in a process during performance testing?? I dont use purify.. Any way of finding it out using default S/W in HP UX-11

Can U gimme pointers to site having good scripts/tutorials on performance testing??

Thanx in Advance..

Forum Sponsor
  #2  
Old 10-17-2002
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
ps -elf will show you the memory usage of processes on your system. You can run ps -elf every so often and compare the size of the processes between runs. If you see one getting larger, it is using more memory. If it continues to use more and more memory or stops doing any actual work and does not free up memory, you may have a leak. I say 'may' because some code will keep the pool of memory allocated to it and use it when it starts processing again.
  #3  
Old 10-17-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
On HP-UX the sz field of ps is the resident set size. Since HP-UX supports demand loading, an increase in the rss may just mean that more of the process has page faulted into core. Depending on what definition of "memory leak" we are using, you may be able to detect leaks by looking at the virtual set size. On HP-UX you can do this with:
UNIX95=1
export UNIX95
ps -o pid,comm,sz,vsz -e
Or if you're using a real shell, just:
UNIX95=1 ps -o pid,comm,sz,vsz -e

HP has a product called glance which is a much better tool for stuff like this. It can show you the RSS/VSS of each memory region of a process.
  #4  
Old 10-18-2002
Registered User
 

Join Date: Aug 2002
Location: California, USA
Posts: 27
Use the top command

You can use the "top" command to minitor the processes that is running on your system

While are running the testing program. You can have another terminal that run the "top" program.

The "top" program will automatically refresh after about couple of seconds. You can see the % of CPU usage and the % of memory usage of the process.

This is my best guess. Hope it helps
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0