Performance
$ vmstat 2
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
3 1 0 2814429 1073396 13 7 28 20 2 0 65 1388 10409 946 25 3 72
3 1 0 2814429 1073319 12 2 0 0 0 0 0 539 12408 311 1 0 99
3 1 0 2814429 1073319 12 0 9 0 0 0 0 533 12371 323 2 2 97
3 1 0 2814429 1073319 7 0 5 0 0 0 0 539 15867 365 1 1 97
The fields for vmstat's display are
procs Number of kernel threads in each of the three following states r run queue b blocked kernel threads waiting for IO w idle processes that have been swapped at some time Memory Report on usage of virtual and real Memory avm active virtual pages in 4KB free size of the free list in 4KB Page re pages reclaimed from free list pi pages paged in from filesystem or swap device to Memory po pages paged out to filesystem or swap device from Memory fr pages that have been freed or destroyed de pages freed after writes sr Pages scanned by clock algorithm per second CPU Percentage usage of CPU us user time sy system time id idle time
SWAPINFO: Prints information about device and file system paging space.
swapinfo
-m displays values in Mb instead of Kb
-t add totals line
-a show all device paging area
swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 20480 15578 4902 76% 0 - 1 /dev/vg00/lvol2
reserve - 4863 -4863
memory 16349 6417 9932 39%
total 36829 26858 9971 73% - 0 -
top
To find out the process which are using more memory
# top -f top.out -n 10000 -d 1
# sort -n -k7,7 top.out
# sort -n -k7,7 top.out | awk '{if ($7~/M$/) {print $0}}'
glance
GlancePlus is a powerful and easy-to-use online performance diagnostic tool for HP-UX systems. It is distributed in two forms: "gpm", a Motif-based program and "glance", a character mode program.
The most use full sub command of glance when used on character based program are:
a CPU By Processor c CPU Report d Disk Report g Process List i IO By File System l Network By Interface m Memory Report n NFS By System t System Tables Report u IO By Disk v IO By Logical Volume w Swap Space U IO By HBA Card V Logical System List j Adjust intervel ? Commands Menu
sar
-L report activity for each active lunpath. If no lunpath is active, then a blank line is printed
# sar -L 2 2
HP-UX aembwqd1 B.11.31 U ia64 06/12/09
12:42:29 lunpath %busy avque r/s w/s blks/s avwait avserv
%age num num num num msec msec
12:42:31 disk127_lunpath103 1.00 0.50 0 1 9 0.00 5.70
12:42:33 disk101_lunpath3 0.50 0.50 0 3 6 0.00 6.28
disk101_lunpath53 0.50 0.50 0 3 6 0.00 7.67
disk127_lunpath103 2.50 0.50 0 4 56 0.00 33.09
Average disk127_lunpath103 1.75 0.50 0 2 32 0.00 27.00
Average disk101_lunpath3 0.25 0.50 0 2 3 0.00 6.28
Average disk101_lunpath53 0.25 0.50 0 2 3 0.00 7.67
Tuning
kctune: kctune is the administrative command for HP-UX kernel tunable parameters. It gives information about tunable parameters and their values, and makes changes to tunable values.
To see all tunables and their current values:
$ kctune
To see which tunables have new values being held until next boot:
$ kctune -D
To To see the tunables with only non default value
$ kctune -S
To see verbose information about a tunable:
$ kctune -v tunablename
To set a tunable value on the running system:
$ kctune tunable=12
To set a tunable value to be used when the system reboots:
$ kctune -h tunable=12
To increase a tunable's value by 100:
$ kctune tunable+=100