본문 바로가기
UniX/Hp-uX

How to use kmeminfo

by 타마마임팩트_쫀 2015. 2. 12.

[출처] http://wiki-ux.info/wiki/How_to_use_kmeminfo

How to use kmeminfo

Abstract

This article describes how to use the HP-UX WTEC tool kmeminfo to perform detail memory usage analysis on HP-UX Operating Environment.

Contents

[hide]


Obtained the Product

Install the Product

kmeminfo-ia64.bin is an HP-UX self explodable archive, it is NOT TO BE RUN ON PC, you must place it on an HP-UX machine, and make it executable, then you can inspect the content of the archive like this:

$ chmod +x ./kmeminfo-ia64.bin
$ ./kmeminfo-ia64.bin -t

You can then explode the archive like this:

$ ./kmeminfo-ia64.bin [-v]

Is a good idea to copy the archive on /var/tmp directory prior to explode it. The next sections assumes the command is exploded on that directory.

Use kmeminfo for the first time

The kmeminfo tool has several options. A good starting point for analysis is a plain kmeminfo and kmeminfo -arena.

Examples:

kmeminfo

# cd /var/tmp
 
# ./kmeminfo
tool: kmeminfo 9.14 - libp4 9.366 - libhpux 1.258
unix: /stand/current/vmunix 11.23 64bit IA64 on host "rx7620c"
core: /dev/kmem live
link: Tue Oct 27 15:18:07 EDT 2009
boot: Mon Nov  2 15:04:13 2009
time: Tue Nov  3 18:41:30 2009
nbpg: 4096 bytes
hpvm: guest (host version 03.50.00)
 
 
----------------------------------------------------------------------
Physical memory usage summary (in page/byte/percent):
 
Physical memory       =   309972    1.2g 100%
Free memory           =    44437  173.6m  14%
User processes        =    93664  365.9m  30%  details with -user
System                =   163442  638.4m  53%
  Kernel              =    93040  363.4m  30%  kernel text and data
    Dynamic Arenas    =    38246  149.4m  12%  details with -arena
      vx_global_kmcac =     8679   33.9m   3%
      spinlock        =     5934   23.2m   2%
      M_TEMP          =     2944   11.5m   1%
      ALLOCB_MBLK_LM  =     2177    8.5m   1%
      PM_HASH         =     2130    8.3m   1%
      Other arenas    =    16382   64.0m   5%  details with -arena
    Super page pool   =     7289   28.5m   2%  details with -kas
    Emergency pool    =      634    2.5m   0%  system critical reserve
    UAREA's           =     4816   18.8m   2%
    Static Tables     =    30122  117.7m  10%  details with -static
      text            =     7733   30.2m   2%  vmunix text section
      pfdat           =     7264   28.4m   2%
      nbuf            =     6064   23.7m   2%  bufcache headers
      vhpt            =     2048    8.0m   1%
      bss             =     1985    7.8m   1%  vmunix bss section
      Other tables    =     5026   19.6m   2%  details with -static
  Buffer cache        =    70402  275.0m  23%  details with -bufcache


kmeminfo - arena

These output can be very long. Redirect the output to a file and review the file content.

# cd /var/tmp
 
# ./kmeminfo -arena > /tmp/kmeminfo-arena.out
 
# cat /tmp/kmeminfo-arena.out
tool: kmeminfo 9.14 - libp4 9.366 - libhpux 1.258
unix: /stand/current/vmunix 11.23 64bit IA64 on host "rx7620c"
core: /dev/kmem live
link: Tue Oct 27 15:18:07 EDT 2009
boot: Mon Nov  2 15:04:13 2009
time: Tue Nov  3 18:43:53 2009
nbpg: 4096 bytes
hpvm: guest (host version 03.50.00)
 
 
 
----------------------------------------------------------------------
Physical memory usage summary (in page/byte/percent):
 
Physical memory       =   309972    1.2g 100%
Free memory           =    45662  178.4m  15%
User processes        =    91249  356.4m  29%  details with -user
System                =   163426  638.4m  53%
  Kernel              =    93024  363.4m  30%  kernel text and data
    Dynamic Arenas    =    38230  149.3m  12%  details with -arena
      vx_global_kmcac =     8663   33.8m   3%
      spinlock        =     5934   23.2m   2%
      M_TEMP          =     2944   11.5m   1%
      ALLOCB_MBLK_LM  =     2177    8.5m   1%
      PM_HASH         =     2130    8.3m   1%
      Other arenas    =    16382   64.0m   5%  details with -arena
    Super page pool   =     7305   28.5m   2%  details with -kas
    Emergency pool    =      634    2.5m   0%  system critical reserve
    UAREA's           =     4800   18.8m   2%
    Static Tables     =    30122  117.7m  10%  details with -static
      text            =     7733   30.2m   2%  vmunix text section
      pfdat           =     7264   28.4m   2%
      nbuf            =     6064   23.7m   2%  bufcache headers
      vhpt            =     2048    8.0m   1%
      bss             =     1985    7.8m   1%  vmunix bss section
      Other tables    =     5026   19.6m   2%  details with -static
  Buffer cache        =    70402  275.0m  23%  details with -bufcache
 
----------------------------------------------------------------------
Dynamic Arenas:
 
 
Variable arena "vx_global_kmcac" owns 8663 pages (33.8mb):
  Free objects represent 4.3mb (13%) of all memory in this arena.
  idx objsz   pages   bytes   %   nobjs    used    free   %
    0    24       2    8.0k   0     252     142     110  44
    1    56       8   32.0k   0     504      67     437  87
    2   120     883    3.4m  10   27373    1622   25751  94
    3   184     286    1.1m   3    6006     600    5406  90
    4   248     284    1.1m   3    4260    4252       8   0
    5   312       5   20.0k   0      60      54       6  10
    6   376       1    4.0k   0      10       7       3  30
    7   440       2    8.0k   0      18      14       4  22
    8   568       3   12.0k   0      21      21       0   0
    9   632       2    8.0k   0      12       7       5  42
   10   760     216  864.0k   2    1080    1080       0   0
   11   952       2    8.0k   0       8       7       1  13
   12  1336       6   24.0k   0      18      15       3  17
   13  1976       8   32.0k   0      16      15       1   6
   14  4024      15   60.0k   0      15      14       1   7
   15  4096       3   12.0k   0       3       1       2  67
   16  8192      76  304.0k   1      38      37       1   3
   18 16384    1520    5.9m  18     380     379       1   0
   19 20480    2565   10.0m  30     513     513       0   0
   21 28672       7   28.0k   0       1       1       0   0
   22 32768      40  160.0k   0       5       5       0   0
   23 36864    2729   10.7m  32     303     303       0   0
...

Reference