40
To resolve the issue:
1.
Execute the
display system internal kernel memory pool
command multiple times
to display memory usage information.
[Sysname-probe] display system internal kernel memory pool slot 1
Active Number Size Align Slab Pg/Slab ASlabs NSlabs Name
9126 9248 64 8 32 1 289 289 kmalloc-64
105 112 16328 0 2 8 54 56 kmalloc-16328
14 14 2097096 0 1 512 14 14 kmalloc-2097096
147 225 2048 8 15 8 12 15 kmalloc-2048
7108 7232 192 8 32 2 226 226 kmalloc-192
22 22 524232 0 1 128 22 22 kmalloc-524232
1288 1344 128 8 21 1 64 64 kmalloc-128
0 0 67108808 0 1 16384 0 0 kmalloc-67108808
630 651 4096 8 7 8 93 93 kmalloc-4096
68 70 131016 0 1 32 68 70 kmalloc-131016
1718 2048 8 8 64 1 31 32 kmalloc-8
1 1 16777160 0 1 4096 1 1 kmalloc-16777160
2 15 2048 0 15 8 1 1 sgpool-64
0 0 40 0 42 1 0 0 inotify_event_cache
325 330 16328 8 2 8 165 165 kmalloc_dma-16328
0 0 72 0 30 1 0 0 LFIB_IlmEntryCache
0 0 1080 0 28 8 0 0 LFIB_IlmEntryCache
0 0 1464 0 21 8 0 0 MFW_FsCache
1 20 136 0 20 1 1 1 L2VFIB_Ac_cache
0 0 240 0 25 2 0 0 CCF_JOBDESC
0 0 88 0 26 1 0 0 NS4_Aggre_TosSrcPre
0 0 128 0 21 1 0 0 IPFS_CacheHash_cachep
---- More ----
Each value line shows the memory information for a slab. The
Number
field shows the number
of objects (memory blocks) allocated to the module. The
Active
field shows the number of
objects used. If the percentage of the used objects keeps increasing, the slab might have
memory leakage issues.
2.
Display the memory call information for the slabs that might have leak problems. This example
uses the
kmalloc-2048
slab.
[Sysname-probe]view /sys/kernel/slab/kmalloc-2048/alloc_calls
23 kque0x58/0x260 age=4262117/4404939/4692659 pid=128-372 cpus=0,2-3
2 sys_init0x1bdc/0x1e50 age=4746250/4748179/4750108 pid=109-128
cpus=9,12
4 __vmalloc_ar0x154/0x1b0 age=4652363/4677089/4747310 pid=128-166
cpus=0-1,12
16 percpu_p0x3c/0x60 age=4322758/4322758/4322758 pid=128 cpus=0
21 alloc_pi0x24/0x60 age=4/3888025/4320768 pid=1-564 cpus=0-4,9,11
29 alloc_0x18/0x40 age=4758366/4758366/4758368 pid=1 cpus=15
2 i0x1c0/0x870 age=510128/2630142/4750157 pid=1-542 cpus=0,2
1 i0x4dc/0x870 age=510128 pid=542 cpus=2
2 kobj_m0x2c/0xd0 age=4758371/4758535/4758700 pid=0-1 cpus=0,15
2 usb_al0x38/0x200 age=4750540/4750605/4750671 pid=1 cpus=15
1 usb_cre0x34/0x120 age=4750540 pid=1 cpus=15