1834149 Members
2776 Online
110064 Solutions
New Discussion

memory tools

 
SOLVED
Go to solution
George Liu_4
Trusted Contributor

memory tools

Currently use top to display memory usage on individual process. However, need more detailed info. Does anyone know some utilities in HPUX like pmap in Solaris? How to display kernel memory usage in detail? Thanks.
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: memory tools

Hi,

It can be used with Glance plus. It can be used as free for some time ( I think 60 days).But gives good info.

HTH,
Devender
Impossible itself mentions "I m possible"
DCE
Honored Contributor

Re: memory tools

Glance will give detailed memory usage. It will give information down to the thread level. If you have measureware agents installed, you can configure it so that glance reports by application groups as well
Fabio Ettore
Honored Contributor
Solution

Re: memory tools

Hi George,

other ITRC people already suggested the best about how to monitor memory usage on HP-UX.
Against my usual philosophy I am going to indicate you a completely unsupported tool on HP-UX:

http://i1.dk/download/pmap/

I hope that helps you.

Best regards,
Fabio
WISH? IMPROVEMENT!
Geoff Wild
Honored Contributor

Re: memory tools

Some scripts:

# cat /usr/local/bin/memtop
#!/bin/sh
# memtop - show top memory users and pid
# VSZ is in KB

echo "VSZ(KB) PID RUSER COMMAND"
UNIX95= ps -e -o 'vsz pid ruser args' |sort -nr|head -30


# cat /usr/local/bin/processmem
#!/bin/sh
# processmem - display memory claimed by a process
# gwild 03192004
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "processmem \"process\""
echo "Example:"
echo "processmem rpc"
exit 1
fi
echo " "

PROCESS=$1

mps=0
#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`
for sz in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $PROCESS | awk '{print $1}'`
do
mps=`expr $mps + $sz`
done
#echo `expr $mps \* 4096`
echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"






As well as memdetail - a c program attached.

# memdetail
Memory Stat total used avail %used
physical 10080.0 10040.8 39.2 100%
active virtual 14250.0 5956.0 8294.0 42%
active real 8645.0 3306.1 5338.9 38%
memory swap 7693.0 1592.4 6100.6 21%
device swap 26528.0 12474.0 14054.0 47%

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.
Geoff Wild
Honored Contributor

Re: memory tools

George - did any of the above help you?

http://forums2.itrc.hp.com/service/forums/pageList.do?userId=CA1099407&listType=unassigned&forumId=1

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.