The command used to check the cpu utilization in hpunix is as follows
Method 1:
#top
Output
CPU UTILIZATION
Step 1:
Check the status of idle value
To find the current utilization = 100 – idle value
Idle value = 70.4
Current utilization = 100-70.4 = 29.6%
Step 2:
Next focus on highly utilized process
The highly utilized process can be found in %CPU
In the above screen we can able to find the first high utilized process is dw.sapCEP_D01 which is consuming around 29.65%
Method 2:
Copy the below command and execute in terminal
# UNIX95= ps -ef -o pid,ppid,pcpu,sz,args | sort -nbk 3 | tail -10
Pid= process id
Ppid = parent of pid
Pcpu = percentage cpu usage
Sz=process name
Args= full path of the process executed command.
In the above screen shoot find the third column is the percentage used by the process. The highest usage process is 1765 with percentage 19.41%
Method 3
To find the how userprocess, system process is consuming the cpu utilization run the below command
# sar -u 5 5
HP-UX utapp1ac B.11.23 U ia64 02/27/09
19:44:22 %usr %sys %wio %idle
19:44:27 16 1 0 83
19:44:32 14 1 0 85
19:44:37 9 1 0 90
19:44:42 8 1 0 90
19:44:47 12 1 0 86
Average 12 1 0 87
Total User Utilization is = 12%
Total System utilization = 1%
Memory Management:
Method 1:
#vmstat
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
2 0 0 861817 112795 8 3 21 3 0 0 24 1231 9748 949 18 1 81
To find the free memory in server
From the above output free = (112795*4) / 1024 = 440MB
Availabe = (861817*4)/1024 = 3366MB
Method 2:
To find the total physical memory installed in the server
Common for PA-Risc and itanium server.
# dmesg | grep -i physical
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 8358472 Kbytes, lockable: 6160756 Kbytes, available: 7152516 Kbytes
From the above output the total memory size = 8358472/1024 = 8162MB
Common for PA-Risc and itanium server.
# print_manifest | grep -i memory
Main Memory: 8162 MB
For itanium server.
# machinfo | grep -i memory
Memory = 8162 MB (7.970703 GB)
Method 3
To find which process is utilizing high memory in the server
Copy the below command and execute in the server.
#UNIX95= ps -ef -o pid,ppid,pcpu,sz,args | sort -nbk 4 | tail -10
The above command will display top 10 highly utilized process which is consuming high memory.
Disk Management:
Method 1
Sar = system activity report
# sar –d 5 5
HP-UX utapp1ac B.11.23 U ia64 02/27/09
19:51:47 device %busy avque r+w/s blks/s avwait avserv
19:51:52 c2t2d0 2.99 0.50 5 50 0.00 6.43
19:51:57 c2t2d0 0.40 0.50 1 7 0.00 7.43
19:52:02 c2t2d0 1.00 0.50 1 19 0.00 20.12
19:52:07 c2t2d0 0.40 0.50 1 10 0.00 8.65
19:52:12 c2t2d0 0.60 0.50 1 10 0.00 12.09
Average c2t2d0 1.08 0.50 2 19 0.00 9.29
Current avg disk utilization is 1.08%
Method 2
To check the i/o status for the disk run the below command
# iostat 5 5
Column Heading Interpretation
device Device name
bps Kilobytes transferred per second
sps Number of seeks per second
msps Milliseconds per average seek
device bps sps msps
c2t2d0 0 0.0 1.0
c2t2d0 123 14.3 1.0
c2t2d0 8 2.0 1.0
c2t2d0 4 0.6 1.0
c2t2d0 117 3.8 1.0
# iostat -t
tty cpu
tin tout us ni sy id
0 70 18 0 1 81
device bps sps msps
c2t2d0 0 0.0 1.0
The iostat command gives you an indication of the level of effort the CPU is putting into I/O and the amount of I/O taking place among your disks and terminals. The following example shows the iostat -t command, which will be executed every three seconds, and associated output from an HP-UX 11.x system
Tin = terminal input
Tout = terminal output
Hardware status:
To collect the hardware details in the server run the below command
#print_manifest
The above command display complete hardware information
To check status of hardware
# ioscan –fn
The above command display complete hardware status
To check disk status in the server
#ioscan –fnC disk
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/1.0.16.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 22 0/3/1/0.1.2.0.0.0.0 sdisk CLAIMED DEVICE HITACHI OPEN-V*15
/dev/dsk/c10t0d0 /dev/rdsk/c10t0d0
Explanation
Ioscan – Input output scan
C = specific class (for example disk, lancard, etc..)
In the above output class=disk
H/W path = 0/0/2/1.0.16.0.0
Instance Number = 0
Device file = /dev/dsk/c0t0d0
In the above output we need to focus on S/w & H/w State where the above output shows the state is CLAIMED where the disk is inserted properly in the server and the driver state is good.
If the disk is not inserted properly then we will get the output as show below
#ioscan –fnC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/1.0.16.0.0 sdisk UNCLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
Like wise you can check for other device as follows
For lan
# ioscan –fnC lan
For fc (Fiber channel card)
#ioscan –fnC fc
For external bus
#ioscan –fnC ext_bus
Fro tape drive
#ioscan –fnC tape
To find the mac address of lancard run the below command
# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/4/2/0 0x0017A451F55C 0 UP lan0 snap0 1 ETHER Yes 119
0/4/2/1 0x0017A451F55D 1 UP lan1 snap1 2 ETHER Yes 119
From the above output we need to focus on Address where address is the mac address of the lan
To find the ip address of the server
# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan0 1500 10.120.14.0 10.120.14.21 715862558 0 1061561099 0 0
lo0 4136 127.0.0.0 127.0.0.1 4983190 0 4983191 0 0
From the above output the ip address of the server is 10.120.14.21
# ifconfig lan0
lan0: flags=1843
inet 10.120.14.21 netmask ffffff00 broadcast 10.120.14.255
ERROR LOGS:
PATH
/var/adm/syslog/syslog.log
Cat the above command to check the errors in the server
#more /var/adm/syslog/syslog.log
PATH
/var/opt/resmon/log
Go the above mentioned path and check for latert event.log message in the server.
Do more, cat the eventlog message to find the detail information above the error.
For example.
# cat /var/adm/resmon/log/event.log
BACKUPMANGAMENT
Example
#bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 573440 270848 300240 47% /
/dev/vg00/lvol1 311296 133672 176328 43% /stand
/dev/vg00/lvol6 8388608 2748536 5596904 33% /var
/dev/vg00/lvol8 6356992 2528384 3800928 40% /usr
/dev/vg00/lvol10 6291456 2937886 3148640 48% /usr/sap/CEP
/dev/vg00/lvol5 4194304 1939104 2237624 46% /tmp
To take backup of /dev/vg00/lvol10 filesystem which is mounted in /usr/sap/CEP filesystem run the below command to do
# fbackup –i /usr/sap/CEP –f
To check the status of tape drive
# mt –f
For example : tape device file = /dev/rmt/0mn
The check the status
#mt –f /dev/rmt/0mn status