AIX: description détaillée de l'utilisation mémoire avec memdetails.sh

Un collègue vient de me faire découvrir le script memdetails.sh fournit une description très précise de l'utilisation mémoire d'un système AIX en formattant différentes sorties de la commande svmon. Toute personne ayant eu la joie de devoir rechercher comment la mémoire d'un système AIX avec cette commande devrait apprécier :-)

Le script memdetails.sh fait partie du package perfpmr à partir de AIX 5.3.

On peut récupérer les packages perfpmr à l'url suivante : dernières versions de perfpmr Voici la sortie de la commande memdetails.sh sur un serveur de base de donnée :

====================================================|==========|===========
Memory Overview | Pages | Megabytes
----------------------------------------------------|----------|-----------
Total memory in system | 2621440 | 10240.00
Total memory in use | 2551599 | 9967.18
Free memory | 69841 | 272.81
====================================================|==========|===========
Segment Overview | Pages | Megabytes
----------------------------------------------------|---------|-----------
Total segment id mempgs | 2452041 | 9578.28
Total fork tree segment pages | 69 | 0.26
Total kernel segment id mempgs | 304428 | 1189.17
jfs segment | 32 | 0.12
kernel heap | 193227 | 754.79
kernel segment | 10415 | 40.68
lfs segment | 1920 | 7.50
lock instrumentation | 0 | 0.00
mbuf pool | 17408 | 68.00
mpdata debug | 2048 | 8.00
other kernel segments | 60327 | 235.65
page space disk map | 160 | 0.62
page table area | 9642 | 37.66
process and thread tables | 384 | 1.50
vmm ame segment | 16 | 0.06
vmm data segment | 592 | 2.31
vmm rmalloc heap | 9 | 0.03
vmm scb segment | 2464 | 9.62
vmm software hat | 4096 | 16.00
vmm vmintervals | 64 | 0.25
miscellaneous kernel segs | 1624 | 6.34

Total kernel mem w/ no segment id (wlm_hw_pages) | 100895 | 394.12
RMALLOC | 9 | 0.03
SW_PFT | 61440 | 240.00
PVT | 5120 | 20.00
PVLIST | 32768 | 128.00
RTAS_HEAP | 2399 | 9.37
----------------------------- | |
Total | 101736 | 397.40

Unaccounted memory (no sids nor wlm_hw_pages) | -1337 | -5.22

===========================================================================
Detailed Memory Components | Pages | Megabytes
----------------------------------------------------|----------|-----------
Light Weight Trace memory | 20472 | 79.96
LVM Memory | 27840 | 108.75
Total Kernel Heap memory | 193227 | 754.79
JFS2 total non-file memory | 141918 | 554.36
metadata_cache | 39706 | 155.10
inode_cache | 96928 | 378.62
fs bufstructs | 2656 | 10.37
misc jfs2 | 2628 | 10.26
misc kernel heap | 51309 | 200.42
Total file memory | 149316 | 583.26
Total clnt (JFS2, NFS,...) file memory | 149316 | 583.26
Total pers (JFS) memory | 0 | 0.00
Total text memory | 13564 | 52.98
Total clnt text memory | 13564 | 52.98
Total pers text memory | 0 | 0.00
User memory | |
USER: root | |
total process private memory | 96717 | 377.80
total shared memory | 292 | 1.14
working (shared w/ other users) | 12579 | 49.13
working (exclusive to user) | 97001 | 378.91
shared memory (exclusive to user) | 284 | 1.10
shared memory (shared w/ other users) | 8 | 0.03
shlib text (shared w/ other users) | 12496 | 48.81
shlib text (exclusive to user) | 0 | 0.00
file pages | 18913 | 73.87
file pages (exclusive to user) | 18913 | 73.87
file pages (shared w/ other users) | 1548 | 6.04
USER: daemon | |
total process private memory | 155 | 0.60
total shared memory | 0 | 0.00
working (shared w/ other users) | 10304 | 40.25
working (exclusive to user) | 155 | 0.60
shared memory (exclusive to user) | 0 | 0.00
shared memory (shared w/ other users) | 0 | 0.00
shlib text (shared w/ other users) | 10304 | 40.25
shlib text (exclusive to user) | 0 | 0.00
file pages | 7 | 0.02
file pages (exclusive to user) | 7 | 0.02
file pages (shared w/ other users) | 0 | 0.00
USER: nobody | |
total process private memory | 103 | 0.40
total shared memory | 0 | 0.00
working (shared w/ other users) | 10304 | 40.25
working (exclusive to user) | 103 | 0.40
shared memory (exclusive to user) | 0 | 0.00
shared memory (shared w/ other users) | 0 | 0.00
shlib text (shared w/ other users) | 10304 | 40.25
shlib text (exclusive to user) | 0 | 0.00
file pages | 59 | 0.23
file pages (exclusive to user) | 59 | 0.23
file pages (shared w/ other users) | 0 | 0.00
USER: oracle | |
total process private memory | 254821 | 995.39
total shared memory [SGA] | 1612952 | 6300.59
working (shared w/ other users) | 12571 | 49.10
working (exclusive to user) | 1867773 | 7295.98
shared memory (exclusive to user) | 1612952 | 6300.59
shared memory (shared w/ other users) | 0 | 0.00
shlib text (shared w/ other users) | 12496 | 48.81
shlib text (exclusive to user) | 0 | 0.00
file pages | 6148 | 24.01
file pages (exclusive to user) | 6148 | 24.01
file pages (shared w/ other users) | 69 | 0.26
USER: maestro | |
total process private memory | 508 | 1.98
total shared memory [SGA] | 808 | 3.15
working (shared w/ other users) | 10312 | 40.28
working (exclusive to user) | 1308 | 5.10
shared memory (exclusive to user) | 800 | 3.12
shared memory (shared w/ other users) | 8 | 0.03
shlib text (shared w/ other users) | 10304 | 40.25
shlib text (exclusive to user) | 0 | 0.00
file pages | 1943 | 7.58
file pages (exclusive to user) | 1943 | 7.58
file pages (shared w/ other users) | 1479 | 5.77
USER: radiusd | |
total process private memory | 12 | 0.04
total shared memory [SGA] | 0 | 0.00
working (shared w/ other users) | 10304 | 40.25
working (exclusive to user) | 12 | 0.04
shared memory (exclusive to user) | 0 | 0.00
shared memory (shared w/ other users) | 0 | 0.00
shlib text (shared w/ other users) | 10304 | 40.25
shlib text (exclusive to user) | 0 | 0.00
file pages | 0 | 0.00
file pages (exclusive to user) | 0 | 0.00
file pages (shared w/ other users) | 0 | 0.00
===========================================================================



===========================================================================
Memory accounting summary | 4K Pages | Megabytes
----------------------------------------------------|----------|-----------
Total memory in system | 2621440 | 10240.00
Total memory in use | 2551599 | 9967.18
Kernel identified memory (segids,wlm_hw_pages) | 403699 | 1576.94
Kernel un-identified memory | 1624 | 6.34
Fork tree pages | 69 | 0.26
Large Page Pool free pages | 0 | 0.00
Huge Page Pool free pages | 0 | 0.00
User private memory | 352316 | 1376.23
User shared memory | 1614044 | 6304.85
User shared library text memory | 12496 | 48.81
Text/Executable code memory in use | 1846 | 7.21
Text/Executable code memory not in use | 11718 | 45.77
File memory | 149316 | 583.26
User un-identifed memory | 4471 | 17.46
---------------------- | |
Total accounted in-use | 2551599 | 9967.18
Free memory | 69841 | 272.81
---------------------- | |
Total identified (total ident.+free) | 2615345 | 10216.19
Total unidentified (kernel+user w/ segids) | 6095 | 23.80
---------------------- | |
Total accounted | 2621440 | 10240.00
Total unaccounted | -1337 | -5.22

Unidentifed user could be:
- shared memory segments currently not attached by processes
- shared libraries currently not used by any processes
- miscellaneous
===========================================================================

La première chose que l'on remarque c'est que c'est nettement plus lisible qu'un rapport svmon brut :-)

Une des parties les plus intéressantes est celle sur l'utilisation mémoire du kernel Total Kernel Heap memory, cela permet de connaitre l'utilisation de la mémoire par le JFS2 en dehors du cache fichier (section Total file memory ). En général, lorsque je ne voie pas où est utiliser la mémoire d'un système, je la retrouve dans cette section.

Et voilà un script bien sympatique de plus :-).

Commentaires

1. Le vendredi, avril 4 2008, 10:33 par Emmanuel

Salut Alain
justement je recherchais ce script ... et je tombe sur ton blog
it's a small world ;-)

2. Le mardi, février 23 2010, 11:38 par toto

Bonjour,

Très intéressant votre article et votre blog (malheureusement plus trop mis à jour).
Au niveau de l'utilisateur oracle, on constate que la SGA prend 6300 Mo. La ligne working (exclusive to user) correspond à SGA + mémoire prise par les process oracle (si j'ai bien compris). Ici nous obtenons donc 7295 Mo d'utilisation totale de la mémoire par oracle. Est-ce bien comme ça qu'il faut l'interpréter ?