Operating System - HP-UX
1820271 Members
3426 Online
109622 Solutions
New Discussion юеВ

Re: list of commands to know about RAM usage.

 
shivakumara
Occasional Advisor

list of commands to know about RAM usage.

Hi,
I wanted to debug one issue regarding memory usage. please let me know commands which I can run to know the memory status.
I know kmeminfo, vmstat and iostat.
please let me know if there are any other that these.

12 REPLIES 12
RAC_1
Honored Contributor

Re: list of commands to know about RAM usage.

UNIX95= ps -ef -o vsz= -o pid= -o args= -o ruser=|sort -nrk1|head

Will give you top 10 memory usage processes.

glance -m is very helpful.

What exactly is your problem??
There is no substitute to HARDWORK
Muthukumar_5
Honored Contributor

Re: list of commands to know about RAM usage.

You can use top command. May be not correct some times.

hth.
Easy to suggest when don't know about the problem!
MarkSyder
Honored Contributor

Re: list of commands to know about RAM usage.

swapinfo -tam

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Arunvijai_4
Honored Contributor

Re: list of commands to know about RAM usage.

1) ipcs -bmop
2) Why not top ??
3) swapinfo

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: list of commands to know about RAM usage.

You can use dmesg as well.

# dmesg | grep -i Physical:

It gives summary of physical memory usage.

# vmstat
It gives virutal memory statistics

# swapinfo -Ma
Memory status.

glance is a tool to debug memory related issues.

hth.

Easy to suggest when don't know about the problem!
Adisuria Wangsadinata_1
Honored Contributor

Re: list of commands to know about RAM usage.

Hi,

Check the url below (docID : KBRC00014838) about 'Determining the Cause of System Performance Problems' :

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000073548851

Glance, top is common tools to check performance issue.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Arunvijai_4
Honored Contributor

Re: list of commands to know about RAM usage.

Glance and other performance tools should help you to achieve this

http://h21007.www2.hp.com/dspp/dld/dld_DownloadsListingPage_IDX/1,2381,11169,00.html

(Glance plus is free for HP partners)

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Morcos
Super Advisor

Re: list of commands to know about RAM usage.

Don't want to repeat the commands suggested, but glance is a good tool for debugging performance issues.

HTH
ziad
morganelan
Trusted Contributor

Re: list of commands to know about RAM usage.

You can use Application Vantage and Server Vantage, a third party tools that can give you graphical chart and you can drill down through chart.The drill down report will show you like this:

Server: MyServer
Counter: System --- Top Physical Memory (K)(<10>)

Time: 06/10/2005 23:54:24
Value: 6152192

Description: KBytes of total physical memory used


Physical Virtual
Process Id Memory(K) Memory(K) Command
---------- --------- --------- -------------
4754 116952 18492 java
4756 80552 18492 java
4755 65324 10300 java
5375 45244 18492 java
5357 40952 18492 java
5398 31248 18492 java
16023 26164 36720 ecoagt
18934 24704 18492 java
26122 20900 82240 ora_ckpt_TRMI
26118 20888 82240 ora_dbw0_TRMI

On HPUX, we usually use glance tools.Execute glance and then choose F3 for memory report.





Kamal Mirdad
Yogeeraj_1
Honored Contributor

Re: list of commands to know about RAM usage.

hi,

on easy way is to run glance then type m

the memory report will give you an output like:
--------------------------------------------------------------------------------
MEMORY REPORT Users= 15
Event Current Cumulative Current Rate Cum Rate High Rate
--------------------------------------------------------------------------------
Page Faults 681 21881 136.2 326.0 566.6
Page In 446 10799 89.2 160.9 300.7
Page Out 0 0 0.0 0.0 0.0
KB Paged In 148kb 1.4mb 29.6 21.5 72.0
KB Paged Out 0kb 0kb 0.0 0.0 0.0
Reactivations 0 0 0.0 0.0 0.0
Deactivations 0 0 0.0 0.0 0.0
KB Deactivated 0kb 0kb 0.0 0.0 0.0
VM Reads 31 234 6.2 3.4 10.6
VM Writes 10 128 6.2 1.9 3.6


hope this helps
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Geoff Wild
Honored Contributor

Re: list of commands to know about RAM usage.

# cat 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"

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.
rmueller58
Valued Contributor

Re: list of commands to know about RAM usage.

I use a script that details users not associated with "root", "informix" or "lp"
for trouble shooting a vendors buggy app:

#/bin/sh
#checkproc
ps -ef |grep -v informix|grep -v root |grep -v lp|grep -v UID |awk '{print $4, $1, $2, $7, $8, $9, $10, $11, $12,$13, $14, $15}' |sort -r| head -10