HP -UX 11.31 monitoring

Hi,
i have joined newly as a hp-ux admin... previously worked in linux environment

can anyone tell me how to monitor memory and cpu utilization in hpux??
hp-ux is not as flexible as linux as i understand... please help me out by giving the commands needed and way of troubleshooting if the problem arises.

Thanks you all... im in a hurry please help me out

---------- Post updated at 08:12 PM ---------- Previous update was at 06:06 PM ----------

:b::b::b::b:

How do you do this in Linux?

I normaly use top,sar ,vmstat commands....
but in hp-ux the top command options are not available ,we can't toggle or sort out the processes based on memory or CPU .i.e the Shift+o doesnt work in hp-ux.

glance

might have capabilities like top.
Info

man glance

Thanks that worked
im surprised to see that most of the servers arer running above 95% memory utilization.
A production server is showing 100%..... is this a serious concern??

That's not a problem if

swapinfo -ta

shows 0% for the dev (swap device).
See also the total (virtual memory) line.

This is the output

# swapinfo -ta
                 Kb          Kb           Kb   PCT      START/          Kb
TYPE          AVAIL        USED         FREE  USED       LIMIT     RESERVE  PRI  NAME
dev       209715200    10283200    199432000    5%           0           -    1  /dev/vg00/lvol2
reserve           -   123027456   -123027456
memory    167141248   156953600     10187648   94%
total     376856448   290264256     86592192   77%       -           0    -
#

any conclusions??

The 5% usage in dev is certainly a concern. Not because of a limit - the 77% is still okay. But performance can suffer already. I am not used to the glance.
But the portable vmstat has pi/po or si/so to indicate current swapping.

vmstat 3

If these are high then performance is impacted. If this happens frequently then a memory upgrade is advisable.

---------- Post updated at 05:55 AM ---------- Previous update was at 05:37 AM ----------

A process can have a memory leak.
List the top 10 memory consumers

UNIX95= ps -eo 'vsz sz pid args'
|sort -k2n | tail

Repeat this after an hour and compare!

vmstat 3

         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  1445470   10682    1    0     4    0     0    0    13   4569   4127   413   0  0 100
    2     0     0  1445470   10666    0    0     3    0     0    0     7   
ps -ef `vsz sz pid args`|sort -k2n|tail
sh: vsz:  not found.
  pe1adm 22428 22357  0  Apr  7  ?         3:44 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
    root 23039     0  0  Mar 30  ?         0:12 lvmpdevd
    root 23040     0  0  Mar 30  ?         0:00 lvmpattachd
    root 23041     0  0  Mar 30  ?         0:00 lvmpcbwd
  pe1adm 23810 22357  0 04:29:20 ?         0:00 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
  pe1adm 23903     1  0  Mar 30  ?        12:19 /usr/sap/PE1/DVEBMGS03/exe/sapstartsrv pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1 -D -u pe1adm
  pe1adm 24361 22357  0  Apr 25  ?         0:12 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
  pe1adm 24386 22357  0  Apr 25  ?         0:08 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
  pe1adm 27472 22357  0  Apr 22  ?        62:51 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
  pe1adm 27605 22357  0  Apr 24  ?         1:34 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1

here are the outputs ...we have sap apps running in the server .
pi stand to be 3 or 4 but po stand to be 0 all the time .

When i see the output from glance it shows 100% mem utilization whereas the swapinfo shows 95%.

how could i judge???
Thanks

Please give the correct ps command:

env UNIX95=1 ps -eo vsz,sz,pid,args | (read line; echo "$line"; sort -k2n | tail)

And repeat this after one hour, compare the first two columns (VSZ and SZ) to see if something is growing.
Your vmstat output:
Because pi is greater than 0 it is really short of memory. The current memory image does not fit into RAM so it needs to page-in from disk - performance suffers.
As long po is 0 the memory image does not grow further (no page-out to disk).

#env UNIX95=1 ps -eo vsz,sz,pid,args|sort -k2n|tail
124114944 2447 2013 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124104128 2484 24386 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124104320 2579 22109 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124119424 2646 21791 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124093056 2850 21124 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124144640 3488 19834 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124175424 3754 8131 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124205120 4256 14014 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124224704 4538 14013 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1
124287296 5342 22405 dw.sapPE1_DVEBMGS03 pf=/usr/sap/PE1/SYS/profile/PE1_DVEBMGS03_diPE1

If the first two columns in the ps output do not permanently rise then it's okay (no memory leak).
More RAM would speed up your system I think.
But you should also ask the "adviser" that is built into glance.
--
xglance is more user-friendly than glance.
Here is a description of glance and xglance.

CPU  Util   U                      43:00                                                                                             |  1%    1%    1%
Disk Util   F                                                                                                                        |  1%    1%    1%
Mem  Util   S                                                                                                               SU     U |100%  100%  100%
Swap Util   U    F                                               UR                                    R                             | 75%    3%    5%
------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                     PROCESS LIST                                                         Users=    2
                         User       CPU %   Thrd   Disk        Memory     Block
Process Name         PID Name    (1600% max) Cnt IO rate    RSS      VSS   On
------------------------------------------------------------------------------------------------------------------------------------------------------
glance             11135 root          2.6     1    3.5   15.7mb   21.6mb SLEEP
dw.sapPE1_DV        8131 pe1adm        2.0     1    0.0    311mb   3.20gb SLEEP
dw.sapPE1_DV       24013 pe1adm        9.2     1    0.2    364mb   3.25gb SLEEP
icman              22389 pe1adm        0.9    30    0.0   68.1mb    358mb   SEM
dw.sapPE1_DV       14014 pe1adm        2.4     1    0.0    346mb   3.23gb SLEEP
dw.sapPE1_DV        1124 pe1adm        1.4     1    0.0    282mb   3.16gb SLEEP
dw.sapPE1_DV       19834 pe1adm        1.1     1    0.0    294mb   3.17gb SLEEP
utild              24987 root          0.4     1    1.2    4.3mb    9.4mb SLEEP
icman              22389 pe1adm        0.1    30    0.0   68.1mb    358mb SLEEP
vxfsd                106 root          0.0    15    2.9    2.1mb    6.2mb SLEEP
dw.sapPE1_DV       24386 pe1adm        0.0     1    0.0    223mb   3.13gb SLEEP
dw.sapPE1_DV       12109 pe1adm        0.0     1    0.0    325mb   3.06gb SLEEP
midaemon            4159 root          0.0    10    0.0   59.7mb   63.1mb SLEEP
cmcld              20525 root          0.0    16    0.0   53.6mb   54.4mb SLEEP
entofskd  AS       22096 root          0.0    10    0.0   14.5mb    892mb SYSTM
scopeux             4151 root          0.0     1    1.1   20.6mb   32.7gb SLEEP
dw.sapPE1_DV       21791 pe1adm        0.0     1    0.0    235mb   3.14gb SLEEP
sapstartsrv        23903 pe1adm        0.0    11    0.1   28.3mb   1.28gb SLEEP
dw.sapPE1_DV       22357 pe1adm        0.0     2    0.0    162mb   3.12gb SLEEP
dw.sapPE1_DV        2013 pe1adm        0.0     1    0.0    222mb   3.14gb SLEEP
sapstartsrv         4754 pe1adm        0.0    12    0.0   27.7mb    190mb SLEEP
dw.sapPE1_DV        2915 pe1adm        0.0     1    0.0    189mb   3.09gb SLEEP
dw.sapPE1_DV       2 406 pe1adm        0.0     1    0.0    180mb   3.04gb SLEEP
cmcld              10516 root          0.0     6    0.0   5371mb   54.5mb SLEEP
dw.sapPE1_DV        8360 pe1adm        0.0     1    0.0    282mb   3.12gb SLEEP
dw.sapPE1_DV       23324 pe1adm        0.0     1    0.0    210mb   3.09gb SLEEP
dw.sapPE1_DV       22428 pe1adm        0.0     1    0.0    173mb   3.05gb SLEEP
dw.sapPE1_DV        9602 pe1adm        0.0     1    0.0    214mb   3.12gb SLEEP
autofskd              66 root          0.0     2    0.0    288mb    563mb SYSTM
      C - cum/inter 9632oggle                              180       04                                                                   Page 1 of 2
ProcList CPU Rpt  M25244t  Disk Rpt                        196       07