1832695 Members
3149 Online
110043 Solutions
New Discussion

HP-UX command

 
Ed Velasco
Occasional Advisor

HP-UX command

Hi Experts,

We have a HP-UX box. Need help on the following:

1) We have 2 processors in the machine but it seems that it is still too slow. How could i check the number of processors and if both are functioning properly?

2) How to check the memory utilization?

Thanks a lot in advance for your help.

Regards,
Ed
11 REPLIES 11
DCE
Honored Contributor

Re: HP-UX command



Ed,

A couple of quick commands

Top will show the cpu utilization by cpu, as well as some other interesting info

glance, if you have it installed will give you detailed reports on CPU and memory

(the graphical version of glance is gpm)

If you weant you can also use sar
Nguyen Anh Tien
Honored Contributor

Re: HP-UX command

Hi Ed
1, In order to determine if CPU work properly you can use:
#top
You will see all CPU in the output.
2, you can use
#vmstat
#glanplus (this sofware need to be purchased)
HTH
HP is simple
Adisuria Wangsadinata_1
Honored Contributor

Re: HP-UX command

Hi,

1. How could i check the number of processors and if both are functioning properly?

# ioscan -nfCprocessor

From here, you will see the number of processor. And if the status is CLAIMED, it means the processor is funtioning properly.

2. How to check the memory utilization?

The good way to check it by using Glance, but this software is purchaseable one.

The other way around by using the command below :

# swapinfo -tam

# vmstat 5 30

# top

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Shameer.V.A
Respected Contributor

Re: HP-UX command

HI Ed,
You can use ioscan to find the processors on your server.

eg:
# ioscan -kfnC processor
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
processor 0 37 processor CLAIMED PROCESSOR Processor
processor 1 45 processor CLAIMED PROCESSOR Processor
processor 2 101 processor CLAIMED PROCESSOR Processor
processor 3 109 processor CLAIMED PROCESSOR Processor

vmstat, top, glance can be used for memory utilization.

You may check for the swap utilization also

swapinfo -tam


Regards,

Shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Muthukumar_5
Honored Contributor

Re: HP-UX command

1) Use top command to view processor count and status.

2) Use vmstat to get memory status. Or

UNIX95= ps -ef -o sz,vsz,pid,comm

--
Muthu
Easy to suggest when don't know about the problem!
Cem Tugrul
Esteemed Contributor

Re: HP-UX command

Also Why "sar" are not suggested for to check
memory utilization...
take a man page of sar
Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Simon Wickham_6
Regular Advisor

Re: HP-UX command

Hi Ed,

Number of processors in use:
# echo "runningprocs/D" | adb /stand/vmunix /dev/mem

Processor speed:
# echo itick_per_usec/D | adb /stand/vmunix /dev/mem

Regards,
Simon
Senthil Prabu.S_1
Trusted Contributor

Re: HP-UX command

Hi,
use top command to find details about processors and how they are utilized.

And vmstat will tell about memory.

Also you can use sar.


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Indrajit_1
Valued Contributor

Re: HP-UX command

Hi;

#top
#glance

Try this two commands..


cheers
indrajit
Never Ever Give Up
Steven E. Protter
Exalted Contributor

Re: HP-UX command

Shalom Ed,

http://www.hpux.ws/system.perf.sh

Its a set if free sar tools that run background and can collect data for any period of time. These will likely show a bottleneck if it exists.

Its always important to now why a system is slow prior to trying to speed it up.

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

Re: HP-UX command

Compile the attached c program called memdtail.

Use tools like glance and top.

cCheck kernel parameters like dbc_mac_pct (default is 50% of ram) you want it to work out between 450 and 800 MB of ram.

# 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.