informatique:nix:hp:hpux_mem

Infos générales sur la mémoire

On utilise la commande kmeminfo. Attention ces commandes ne sont pas forcément installées sur toute machine HP-UX, il faut installer les OnlineDiag.

root@machine:/$ /usr/contrib/bin/kmeminfo
tool: kmeminfo 5.15
unix: /stand/vmunix 11.23 64bit IA64
core: /dev/kmem live
link: Thu Sep 07 16:47:42 METDST 2006
boot: Thu Nov  9 16:01:04 2006
time: Thu Nov  9 16:28:21 2006
nbpg: 4096 bytes


----------------------------------------------------------------------
Physical memory usage summary (in page/byte/percent):

Physical memory       =  1832834    7.0g 100%
Free memory           =   839354    3.2g  46%
User processes        =   441130    1.7g  24%  details with -user
System                =   386278    1.5g  21%
  Kernel              =   215488  841.8m  12%  kernel text and data
    Dynamic Arenas    =    67183  262.4m   4%  details with -arena
      vx_global_pool  =    16144   63.1m   1%
      spinlock        =    11346   44.3m   1%
      vm_pfn2v_arena  =     7236   28.3m   0%
      VFD_BT_NODE     =     3495   13.7m   0%
      M_TEMP          =     3482   13.6m   0%
      Other arenas    =    25480   99.5m   1%  details with -arena
    Super page pool   =    23787   92.9m   1%  details with -kas
    Static Tables     =    91496  357.4m   5%  details with -static
      pfdat           =    42957  167.8m   2%
      vhpt            =    16384   64.0m   1%
      nbuf            =    14736   57.6m   1%  bufcache headers
      text            =     6724   26.3m   0%  vmunix text section
      data            =     1534    6.0m   0%  vmunix data section
      Other tables    =     9160   35.8m   0%  details with -static
  Buffer cache        =   170790  667.1m   9%  details with -bufcache

Infos sur la swap

Attention : penser à vérifier si le swapmem_on est activé ou non.

root@machine:/$ swapinfo -ta
             Kb      Kb      Kb   PCT  START/      Kb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev     6283264       0 6283264    0%       0       -    1  /dev/vg00/lvol2
dev     2097152       0 2097152    0%       0       -    1  /dev/vg00/lv_paging
reserve       - 5039336 -5039336
total   8380416 5039336 3341080   60%       -       0    -

Infos sur un segment mémoire

Soit le segment mémoire suivant obtenu avec la commande suivante :

machine:/# ipcs -ma|grep sybase|head -n 1
m  110136018 0xdc6412ff --rw-------  sybase   DBA  sybase   DBA    1  3309568  4452  4452  1:00:01 no-entry  1:00:01

On récupère le pid qu'on donne en paramètre à shminfo :

machine:/# /usr/contrib/bin/shminfo -s 110136018
libp4 (8.83): Opening /stand/vmunix /dev/kmem

Loading symbols from /stand/vmunix
Kernel TEXT pages not requested in crashconf
Will use an artificial mapping from a.out TEXT pages
shminfo (3.9)

Shmid 110136018:
struct shmid_ds at 0xe699d8
Pseudo vas at 0xf33f9980
Pseudo pregion at 0xe3d9fe80
Shared region at 0xe50cfc80
Segment at 0x92b400.0xc00000000040f000
Segment allocated out of "Global 64-bit quadrant 4"
Processes using this segment:
proc=0xe468b040 (pid 4452 "AL21_FRA_LIV_M"): vas=0x12702f0c0, SHMEM preg=0xf33c3f00

Si shminfo n'est pas installé sur le serveur, il est possible de le récupérer sur ftp://eh:spear9@hprc.external.hp.com/ (dans les toolset)

Pour plus d'information, consulter la page http://www.hp-eloquence.com/sdb/html/1144250417.html

Paramètres mémoire principaux

On trouve ces infos avec :

  • kmtune en 11.11 (11iv1)
  • kctune en 11.23 (11i v2)
kmtune|grep -i maxdsiz
maxdsiz            1073741824  -  1073741824
maxdsiz_64bit      4294967296  -  4294967296
shmem                       1  -  1
shmmax             4294967296  Y  4294967296
shmmni                   1600  -  1600
shmseg                   1024  Y  1024
swapmem_on                  1  -  1
maxswapchunks           10000  -  10000

Pour modifier les paramètres en 11.11 :

kmtune -u -s shmmax=12582912000

Pour modifier les paramètres en 11.23 :

kctune -h shmmax=12582912000

ipcs amélioré

ipcs n'indique que les heures, pas les dates. Voici une version améliorée pour HP-UX :

tusc -v ipcs -ma 2>&1 |
awk 'BEGIN { printf("%5s %9s %-20s %3s %19s %19s %19s\n","UID","SIZE","KEY","NAT","ATIME","DTIME","CTIME") }
/pstat/ { id="x" ; key="x" ; at="x" ; dt="x" ; ct="x" ; na="x" }
/psh_uid/  {id=$2 }
/psh_segsz/ {sz=$2 }
/psh_key/ { key=$2 }
/psh_nattch/ { na=$2 }
/psh_atime/ { at=$0 ; sub(".*time: ","",at) }
/psh_dtime/ { dt=$0 ; sub(".*time: ","",dt) }
/psh_ctime/ { ct=$0 ; sub(".*time: ","",ct) }
/psh_valid/ {printf("%5d %9d %-20s %3d %s %s %s\n",id,sz,key,na,at,dt,ct) | "sort" }'
  • informatique/nix/hp/hpux_mem.txt
  • Dernière modification : 2009/07/31 09:29
  • de 127.0.0.1