show memory mem-leak

Displays memory leak information of FastIron process and other supported processes.
Syntax
show memory mem-leak { processes | { ref-cnt | resource | size } [ process-name name ] }
Parameters
processes
Displays all processes supporting memory leak detection.
ref-cnt
Displays the collected memory leak information based on the reference count in the specified process.
resource
Displays the collected memory leak information based on the resource in the specified process.
size
Displays the collected memory leak information based on the size in the specified process.
process-name name
Specify the name of the process for which you want the memory leak details. If the process name is not specified, the FastIron process is considered by default.
Modes

Privileged EXEC mode

Examples

The following example displays all processes supporting memory leak detection.

device# show memory mem-leak processes
Processes supporting memory leak monitoring feature FastIron
FastIron        ITC_MSG_TYPE=0x8e0019 DEST_APP_ID=0x5a PID=1548 709
hmond           ITC_MSG_TYPE=0x890008 DEST_APP_ID=0x6e PID=593 591
poed            ITC_MSG_TYPE=0xae0100 DEST_APP_ID=0x95 PID=549
fi_syslog       ITC_MSG_TYPE=0x1b0100 DEST_APP_ID=0x55 PID=2707
cfg_sync        ITC_MSG_TYPE=0xc20008 DEST_APP_ID=0xa0 PID=2445
snmpagentd      ITC_MSG_TYPE=0x18000a DEST_APP_ID=0x16 PID= -
netconfd_svc    ITC_MSG_TYPE=0x8c0005 DEST_APP_ID=0x73 PID= -

The following example enables memory leak detection and displays the collected memory leak information based on the resource in FastIron process.

device#debug mem-leak on
Start memory leak monitoring in FastIron
Tracking is on
Will automatically turn off after 3 months
device#show memory mem-leak resource process-name FastIron
Memory leak show by resource in FastIron
From processID=888
memory tracking has run 00:00:06
malloc 1479 times, 1383624 B, free: # 1478 , 1383505 B, not in: 1
                      alloc in-use  avail get-fail    limit  get-mem  size init
mem-ptr pool           2000      1   1999        0   100000     1479    12 2000
stack pool             1000      1    999        0    10000     1399    92 1000
mem-ptr hash: size=1, anch=2003, pool: s=2003, use=1, fail=0
stack hash: size=1, anch=1003, pool: s=1003, use=1, fail=0
**** Warning! counter free not in hash = 1

The following example enables memory leak detection and displays the collected memory leak information based on the size in FastIron process.

device#show memory mem-leak size  process-name FastIron
Memory leak show by size in FastIron
From processID=888
memory tracking has run 00:00:24
malloc 5473 times, 5149409 B, free: # 5470 , 5149143 B, not in: 2
un-freed sorted by size: total 266 B, 3 malloc, 3 stack.
1 size=115, ref_cnt=1, stack: 01bb1e44 f6f923f0 f6e38b50 0051ba6c 004c4b48
    0051dcc8 f6f9ce8c f73ac5cf
2 size=78, ref_cnt=1, stack: 01bb1e44 f6f923f0 01bb2634 005810e8 00675a38
    006498fc 00688f84 0008ebd8 01b90c04 01b91e50 004c44a8 001fcd48 000a76c8
    00034e50 f6f9ce8c f73ac5cf
3 size=73, ref_cnt=1, stack: 01bb1e44 f6f923f0 01bb2650 00688cd8 006892cc
    0062a77c 00633c48 0064996c 00688f84 0008ebd8 01b90c04 01b91e50 004c44a8
    001fcd48 000a76c8 00034e50 f6f9ce8c f73ac5c

The following example enables memory leak detection and displays the collected memory leak information based on the resource in poed process.

device# debug mem-leak on process-name poed
Start memory leak monitoring in poed
Tracking is on
Will automatically turn off after 3 months
device# show memory mem-leak resource process-name poed
Memory leak show by resource in poed
From processID=1507
memory tracking has run 00:00:31
malloc 248 times, 279991 B, free: # 248 , 279991 B, not in: 0
                      alloc in-use  avail get-fail    limit  get-mem  size init
mem-ptr pool           2000      0   2000        0   100000      248    12 2000
stack pool             1000      0   1000        0    10000      248    92 1000
mem-ptr hash: size=0, anch=2003, pool: s=2003, use=0, fail=0
stack hash: size=0, anch=1003, pool: s=1003, use=0, fail=0

The following example enables memory leak detection and displays the collected memory leak information based on the size in poed.

device# debug mem-leak on process-name poed
Start memory leak monitoring in poed
Tracking is on
Will automatically turn off after 3 months
device# show memory mem-leak size process-name poed
Memory leak show by size in poed
From processID=1507
memory tracking has run 00:01:37
malloc 829 times, 934824 B, free: # 827 , 934725 B, not in: 1
un-freed sorted by size: total 99 B, 2 malloc, 2 stack.
1 size=84, ref_cnt=1, stack: b60215e8 b6021bb4 b5ef2404 b5f00de0 b5ef9f60 0003da34 0002f3cc 0003b3e8 b6030c60 b6031704 0003ec40 b5efceb0 
2 size=15, ref_cnt=1, stack: b60215e8 b6021bb4 b5ef2404 00030ee0 0003b438 b6030c60 b6031704 0003ec40 b5efceb0
History
Release version Command history
09.0.00 This command was introduced.