Operating System - HP-UX
1835036 Members
4357 Online
110073 Solutions
New Discussion

Trying to identify processes that hogs the memory

 
Bibi
Occasional Contributor

Trying to identify processes that hogs the memory

Our system, HP-UX B.11.11 U 9000/800, with 8 GB of Memory, is constantly having memory utilization issues with free memory running 97096K or below. With glance, I identifed our Sybase dataservers were some of the resources that was hogging memory, and we changed the named cache to less than 1 gb for our 2 dataservers. That should leave us with 6 gb still left. However, this morning, again, after the change, the memory utilization had crept up to 99%.

Question...What is the best way to identify the processes that are eating the resources?
7 REPLIES 7
RAC_1
Honored Contributor

Re: Trying to identify processes that hogs the memory

UNIX95= ps -ef -o "vsz,ruser,pid,args"|sort -nr will give you list of the processes sorted on memory usage. The vsz value is in KB. Also glance -g and glance -m will give good idea about which processes are cauing problem.

What are your settings for buffer cache? What is the swap space that you have configured?

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: Trying to identify processes that hogs the memory

I'd start with glance. You can drill into the processes and see how much memory they are using.

The gui, gpm is a little more useful for this.

You can use lsof to help identify the processes. http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/

I would look at the database setup files and see what the memory limits are.

SEP


Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bibi
Occasional Contributor

Re: Trying to identify processes that hogs the memory

Thank You...both replies valuable. Will also install SAR. Appreciate the feedback.

Thanks,
Bibi
Geoff Wild
Honored Contributor

Re: Trying to identify processes that hogs the memory

Here's a little script I use - similiar to above:

cat top10
#/bin/sh
UNIX95= ps -e -o "vsz pcpu ruser pid stime time state args" | sort -rn |head -10


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mark Greene_1
Honored Contributor

Re: Trying to identify processes that hogs the memory

If you don't have a license for glance, you should have Top. What version of what Sybase product are your running, and have you search Sybase's website to see if this is a known configuration or patch issue?

mark
the future will be a lot like now, only later
Ted Buis
Honored Contributor

Re: Trying to identify processes that hogs the memory

PRM might be useful to limit the memory usage of a process that doesn't behave nicely on its own. If you have the Enterprise Operating Environment for 11.11, then you have both Glance and PRM.
Mom 6
Steve Steel
Honored Contributor

Re: Trying to identify processes that hogs the memory

Hi


Look at

Memory Usage (â What is using all of the memoryâ ?)

by:eric.herberholz@hp.com

Last modified: March 23, 2004

Latest version also available at external ftp site:

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



Also unix95 is great

1 #!/usr/bin/ksh
2 #
3 # Show processes sorted by size of core image
4 #
5 # Usage:
6 # psram [ quantity ]
7 #
8 # where quantity is the top RAM processes to show (default is 20)
9 #
10 set -u
11 if [ $# -gt 0 ]
12 then
13 TOPPROCS=$1
14 else
15 TOPPROCS=20
16 fi
17
18 MYNAME=$(basename $0)
19 TEMPFILE=/var/tmp/$MYNAME.$$
20 trap `rm -f $TEMPFILE > /dev/null 2>&1` 0 1 2 3 15
21
22 UNIX95= ps -e -o ruser,vsz,pid,args > $TEMPFILE
23 head -1 $TEMPFILE
24 DASH5="-----"
25 DASH25="$DASH5$DASH5$DASH5$DASH5$DASH5"
26 echo "$DASH5---- $DASH5- $DASH5 $DASH25$DASH25"
27 grep -v "VSZ COMMAND" $TEMPFILE \
28 | cut -c -78 \
29 | sort -rn -k2 \
30 | head -${TOPPROCS}
31 rm $TEMPFILE > /dev/null 2>&1
32 #### END OF SCRIPT


Steve
If you want truly to understand something, try to change it. (Kurt Lewin)