病征
我们的网络监控软件发现一些新生产交换机上的内存使用量一直在增加。这些交换机是Cisco 2960X,并带有15.0(2)EX3 IOS。
众所周知,Cisco IOS中有两种内存:进程内存和IO内存。
- 在IOS设备(例如PIM,HSRP等)上启用功能后,IOS会为进程分配进程内存。
- 当软件交换的流量到达CPU时,将使用IO内存。 CPU分配IO内存以临时存储帧。
我们的情况是进程内存增加。我们需要做的是找出哪个过程。
Switch1# show version 思科IOS 软件, C2960X 软件 (C2960X-UNIVERSALK9-M), Version 15.0(2)EX3, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by 思科公司 Systems, Inc.
Compiled Wed 11-Sep-13 02:04 by prod_rel_team
ROM: Bootstrap program is C2960X boot loader
BOOTLDR: C2960X Boot Loader (C2960X-HBOOT-M) Version 15.0(2r)EX, RELEASE SOFTWARE (fc1)
CSWP3024 uptime is 5 days, 23 hours, 48 minutes
System returned to ROM by power-on
System restarted at 05:47:41 EST Sat Mar 11 2017
System image file is "flash:/c2960x-universalk9-mz.150-2.EX3/c2960x-universalk9-mz.150-2.EX3.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of 思科公司 cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. 通过 using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing 思科公司 cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected]
cisco WS-C2960X-48TS-LL (APM86ZZZ) processor (revision B0) with 262144K bytes of memory.
Processor board ID FOC1744W3V5
Last reset from power-on
2 Virtual Ethernet interfaces
1 FastEthernet interface
50 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.
512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 5C:A4:8A:5C:6F:80
Motherboard assembly number : 73-14196-03
Power supply part number : 341-0537-02
Motherboard serial number : FOC17443CWD
Power supply serial number : LIT17320EU6
Model revision number : B0
Motherboard revision number : B0
Model number : WS-C2960X-48TS-LL
Daughterboard assembly number : 73-14200-03
Daughterboard serial number : FOC17440VRF
System serial number : FOC1744W3V5
Top Assembly Part Number : 800-38011-02
Top Assembly Revision Number : B0
Version ID : V02
CLEI Code Number : CMMNG00ARA
Daughterboard revision number : A0
Hardware Board Revision Number : 0x05
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 50 WS-C2960X-48TS-LL 15.0(2)EX3 C2960X-UNIVERSALK9-M
Configuration register is 0xF
Switch1#show memory statistics history ------------------ History of 处理or Mempool ------------------ 777777777777777777777777777777777777777777777777777777777777 222222222222222222222222222222222222222222222222222222222222 100 90 80 70 ********************************************************** 60 ********************************************************** 50 ********************************************************** 40 ********************************************************** 30 ********************************************************** 20 ********************************************************** 10 ********************************************************** 0....5....1....1....2....2....3....3....4....4....5....5....6 0 5 0 5 0 5 0 5 0 5 0 Free memory per second (last 60 seconds) 777777777777777777777777777777777777777777777777777777777777 222222222222222222222222222222222222222222222222222222222222 100 90 80 70 ########################################################## 60 ########################################################## 50 ########################################################## 40 ########################################################## 30 ########################################################## 20 ########################################################## 10 ########################################################## 0....5....1....1....2....2....3....3....4....4....5....5....6 0 5 0 5 0 5 0 5 0 5 0 Free memory per minute (last 60 minutes) * = maximum # = average 777777777777777777777777777777777777777777777777777777777777777777777777 222222222233333333333333444444444444444555555555555555666666666666667777 100 90 80 **############################# 70 ###################################################################### 60 ###################################################################### 50 ###################################################################### 40 ###################################################################### 30 ###################################################################### 20 ###################################################################### 10 ###################################################################### 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.. 0 5 0 5 0 5 0 5 0 5 0 5 0 Free memory per hour (last 72 hours) * = maximum # = average ------------------ History of I/O Mempool ------------------ 555555555555555555555555555555555555555555555555555555555555 888888888888888888888888888888888888888888888888888888888888 100 90 80 70 60 ********************************************************** 50 ********************************************************** 40 ********************************************************** 30 ********************************************************** 20 ********************************************************** 10 ********************************************************** 0....5....1....1....2....2....3....3....4....4....5....5....6 0 5 0 5 0 5 0 5 0 5 0 Free memory per second (last 60 seconds) 555555555555555555555555555555555555555555555555555555555555 888888888888888888888888888888888888888888888888888888888888 100 90 80 70 60 ########################################################## 50 ########################################################## 40 ########################################################## 30 ########################################################## 20 ########################################################## 10 ########################################################## 0....5....1....1....2....2....3....3....4....4....5....5....6 0 5 0 5 0 5 0 5 0 5 0 Free memory per minute (last 60 minutes) * = maximum # = average 555555555555555555555555555555555555555555555555555555555555555555555555 888888888888888888888888888888888888888888888888888888888888888888888888 100 90 80 70 60 ###################################################################### 50 ###################################################################### 40 ###################################################################### 30 ###################################################################### 20 ###################################################################### 10 ###################################################################### 0....5....1....1....2....2....3....3....4....4....5....5....6....6....7.. 0 5 0 5 0 5 0 5 0 5 0 5 0 Free memory per hour (last 72 hours) * = maximum # = average
从我们的管理软件中,空闲内存图显示它正在不断减少,直到整个系统失去响应。
![]() |
监视工具中的可用交换机内存减少 |
故障排除
交换机内存不足的主要原因有两个。
1.不再需要内存后,进程无法释放内存。这通常称为内存泄漏。
2.进程不限制其分配的内存量。最终,该进程用尽了交换机上的所有进程内存。
目的是确定行为异常的过程。有两种方法。
- 确定任何进程泄漏内存
显示进程内存调试泄漏
注意:此命令仅在维护窗口或设备不在生产中时运行。此命令可方便地识别任何进程泄漏内存。但是,如果内存问题是由进程引起的,则它并没有抢占所有内存,这没有帮助。
- 确定一个进程占用了所有内存
可能的解决方法:
谷歌搜索后,我确实找到了许多相关的Cisco错误和建议。
1. 思科Bug:CSCut06609 –在Auth Manager进程中看到的内存泄漏-来自ASP组件的泄漏(不是我们的情况)
//quickview.cloudapps.cisco.com/quickview/bug/CSCut06609
上一次更改
产品
已知受影响的版本
描述 (部分)
症状: ++ Very slow memory leak in "Auth Manager" process seen 上 2960s/2960x switches running 15.0(2)SE5. ++ Everyday we see about 64KB leak in Auth Manager process. ++ Leak is seen 上 a setup having no "Auth session" present (Only auth hidden sessions) and no ports running MAB or dot1X. It is not same as CSCuq53377. ++ The leak is seen in "Auth Manager" process but it is actually being caused by ASP component. 条件: "macro auto monitor" need to be enabled globally, it could be seen even when no switch port is running MAB/dot1x.
下面的“修复”解决了到目前为止的所有问题:
显然,在IOS中,有一个“身份验证管理器”可以监控所有
会话中的会话。从15.0 IOS流开始,此功能是
默认情况下启用。如错误所描述:
“ Auth Manager继续在处理器池锁定中保留更多内存
除非重新启动交换机,否则无法访问3750堆栈”
为了防止内存“泄漏”到处理器,您必须
通过发出以下命令来禁用此会话监视:
没有宏自动监控
尝试过此方法,但在这种情况下没有帮助。
2. 思科Bug:CSCut92215 – hrpc_incoming_request_handler_process中的内存泄漏– 15.0(2)EX5(不是我们的情况)
//quickview.cloudapps.cisco.com/quickview/bug/CSCut92215
上一次更改
产品
已知受影响的版本
描述 (部分)
症状: Show process memory sorted will display MallocLite holding memory but no freeing it SW#show process memory sorted Processor Pool Total: ZZZZZZXX Used: ZZZZZZXX Free: ZZZZZZX I/O Pool Total: ZZZZZZXX Used: ZZZZZZXX Free: ZZZZZZX Driver te Pool Total: ZZZZZZX Used: XX Free: ZZZZZZX PID TTY Allocated Freed Holding Getbufs Retbufs 处理 0 0 ZZZZZZXX ZZZZZZXX ZZZZZZXX 0 0 *Init* 0 0 X 0 ZZZZZZXX 0 0 *MallocLite* ////////////////// show mem lite-chunk statistics will show a large disparity between Inuse and Free SW#show mem lite-chunk statistics Pool Inuse Free 8-Bytes ZZZ ZZZX 20-Bytes ZZZZZZ ZZZX <<<<<< 44-Bytes ZZZX ZZZ 68-Bytes ZZZ ZZZ 96-Bytes ZZZ ZZZ 128-Bytes XX ZZZ 条件: SW running 15.0(2)EX5
3.禁用SNMP(不是我们的情况)
–无宏自动监控
–没有运行cdp
– snmp完全禁用
4. hulc_flash初始化过程导致内存泄漏(我们的案例)
Switch1#show processes memory sorted | i Total处理or Pool Total: 174442388 Used: 50534880 Free: 123907508
I/O Pool Total: 16777216 Used: 6924400 Free: 9852816
Driver te Pool Total: 1048576 Used: 40 Free: 1048536
57447240 Total
Switch1#show processes memory sorted | i Total处理or Pool Total: 174442388 Used: 50661608 Free: 123780780
I/O Pool Total: 16777216 Used: 6924400 Free: 9852816
Driver te Pool Total: 1048576 Used: 40 Free: 1048536
57573808 Total
您可以看到处理器池总可用内存在减少,可用I / O和驱动程序池剩余内存保持不变。
从排序的进程内存命令中检查更多详细信息,通过比较保持内存数据和5分钟前收集的数据,*死*进程内存正在增加。
Switch1#show processes memory sorted 处理or Pool Total: 174442388 Used: 50519544 Free: 123922844
I/O Pool Total: 16777216 Used: 6924400 Free: 9852816
Driver te Pool Total: 1048576 Used: 40 Free: 1048536
PID TTY Allocated Freed Holding Getbufs Retbufs 处理
0 0 59344172 24818044 31046036 0 0 *Init*
0 0 0 0 19543880 0 0 *MallocLite*
0 0 40461580 39067064 1530300 6881007 949166 *Dead*
87 0 715684 146228 451160 0 0 Stack Mgr Notifi
289 0 267228 0 277388 100548 0 EEM ED Syslog
1 0 234876 36256 205780 0 0 Chunk Manager
68 0 206732 232 188500 0 0 USB Startup
205 0 1520792 1070688 154044 0 0 802.1x switch
65 0 108532 400 118292 0 0 EEM ED Identity
180 0 153020 8916 109604 0 0 DHCPD Receive
102 0 93356 212 100304 53760 0 HRPC emac reques
153 1 3418792 3336728 94288 0 0 SSH 处理
300 0 70460 0 77620 0 0 EEM Server
178 0 13629416 300 75732 802008 0 CDP Protocol
138 0 65812 232 72740 0 0 REP Helper Proc
53 0 108644 84688 71160 0 0 IF-MGR control p
175 0 530220 373064 62440 0 0 Auth Manager
128 0 232 2204 61160 0 0 HACL Acl Manager
159 0 499433728 499416280 61160 10152 0 HRPC qos request
173 0 49364 0 56524 0 0 ACCT Periodic Pr
280 0 237076 202296 48632 0 0 Crypto CA
21 0 48776 64728 45920 0 9620 Entity MIB API
17 0 211669728 211633028 43860 0 0 ARP Input
189 0 33020 0 40180 0 0 IP ARP Retry Age
297 0 12408 0 37440 0 0 LICENSE AGENT
230 0 50872 9248 34396 0 0 CEF: IPv4 proces
8 0 1547520 3356300 32952 1401600 2400103 Pool Manager
Switch1#show processes memory sorted
Processor Pool Total: 174442388 Used: 50659912 Free: 123782476
I/O Pool Total: 16777216 Used: 6924400 Free: 9852816
Driver te Pool Total: 1048576 Used: 40 Free: 1048536
PID TTY Allocated Freed Holding Getbufs Retbufs 处理
0 0 59344172 24818044 31046036 0 0 *Init*
0 0 0 0 19675040 0 0 *MallocLite*
0 0 44037920 42642260 1531252 6881007 949166 *Dead*
87 0 715684 146228 451160 0 0 Stack Mgr Notifi
289 0 267228 0 277388 100548 0 EEM ED Syslog
1 0 234876 36256 205780 0 0 Chunk Manager
68 0 206732 232 188500 0 0 USB Startup
205 0 1520792 1070688 154044 0 0 802.1x switch
65 0 108532 400 118292 0 0 EEM ED Identity
180 0 153020 8916 109604 0 0 DHCPD Receive
102 0 93356 212 100304 53760 0 HRPC emac reques
153 1 193080 111648 93592 0 0 SSH 处理
300 0 70460 0 77620 0 0 EEM Server
178 0 13658484 300 75732 802008 0 CDP Protocol
138 0 65812 232 72740 0 0 REP Helper Proc
53 0 108644 84688 71160 0 0 IF-MGR control p
175 0 530220 373064 62440 0 0 Auth Manager
159 0 510696628 510679180 61160 10152 0 HRPC qos request
128 0 232 2204 61160 0 0 HACL Acl Manager
173 0 49364 0 56524 0 0 ACCT Periodic Pr
280 0 237076 202296 48632 0 0 Crypto CA
21 0 48776 64728 45920 0 9620 Entity MIB API
17 0 212097396 212060696 43860 0 0 ARP Input
189 0 33020 0 40180 0 0 IP ARP Retry Age
297 0 12408 0 37440 0 0 LICENSE AGENT
230 0 50872 9248 34396 0 0 CEF: IPv4 proces
112 0 4349612 232 33052 0 0 HLFM address lea
8 0 1547520 3356300 32952 1401600 2400103 Pool Manager
321 0 288460 157320 31420 0 0 SNMP Traps
199 0 5724 0 30884 0 0 SMI Backup Proce
197 0 3160 592 28360 0 0 SMI Director DB
60 0 74608 52800 27056 0 0 Per-Second Jobs
306 0 232 0 25392 0 0 tHUB
从“显示内存死总数”命令的输出显示,有很多hulc_flash init实例。
Switch1#show memory dead totals
Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)
Processor 49B2FA0 174442388 50508688 123933700 123791240 103785944
I/O E000000 16777216 6924444 9852772 9736080 9805164
Driver te 2B00000 1048576 44 1048532 1048532 1048532
Dead Proc Summary for: 处理or
PC Total Count Name
0x020CC35C 942068 47 mifs NOR Sector
0x0036E178 201252 20 SSH 处理
0x020D35AC 100220 5 mifs sector buffers
0x01B31C10 65580 1 AAA Large Chunk
0x0017E2D4 64696 517 hulc_flash init
0x020D6A08 25220 5 mifs cache_entry buffers
0x020CC91C 20044 1 mifs NOR Sector Info Pointers
0x0204DE2C 10576 1 master cfg mgr init process
0x02050388 10548 1 HTTP SSL PKI CERTIFICATE CREATE PROC
0x0099C134 9756 1 EEM Shell Director
0x020CC974 8656 10 hulc_flash init
0x0021CBE8 7316 54 Smartport macro autoexec subblock
0x02304ED0 6888 51 LLDP-MED local annex
0x020B0788 6188 1 hulc_flash init
0x01B5F2DC 4652 1 Watcher Info
0x022E3640 4100 52 LIM Index
0x014829EC 3716 3 OBFL UPTIME obfl0
0x020D3DE0 2780 5 hulc_flash init
0x020D3684 2720 5 mifs file_map buffers
0x02883318 2352 7 platform OBFL
0x00477224 2196 1 HTTP SSL PKI CERTIFICATE CREATE PROC
0x004ADE94 2124 1 HTTP SSL PKI CERTIFICATE CREATE PROC
0x020D3618 2040 5 mifs file_info buffers
0x014618C4 1796 5 OBFL UPTIME obfl0
0x020C7A68 1708 24 hulc_flash init
0x020C79F8 1668 24 hulc_flash init
0x020C79BC 1632 24 hulc_flash init
0x01B5E85C 1544 1 Watched Semapho
0x005C40A8 1460 4 HTTP SSL PKI CERTIFICATE CREATE PROC
0x020D6928 1020 15 hulc_flash init
0x020D3DA4 980 5 hulc_flash init
0x020CCA94 460 5 hulc_flash init
0x004ADD80 444 1 HTTP SSL PKI CERTIFICATE CREATE PROC
0x020CCB3C 400 5 hulc_flash init
0x020D08E0 340 5 hulc_flash init
0x020D6C40 340 5 hulc_flash init
0x000730D4 308 1 platform OBFL
0x000739B0 308 1 platform OBFL
0x00073814 308 1 platform OBFL
0x00073B14 308 1 platform OBFL
0x000732A4 308 1 platform OBFL
0x00072E5C 308 1 platform OBFL
0x00343B40 276 3 TTY timer block
0x0045A4EC 232 1 HTTP SSL PKI CERTIFICATE CREATE PROC
0x01489A94 216 1 OBFL Infra Device info
0x01B31A48 208 1 AAA Large Chunk
0x00C1869C 144 1 HTTP
0x003877F0 136 1 Parser Mode
0x020B0734 112 1 hulc_flash init
0x00BF1E80 104 1 HTTP
0x00BFE2FC 100 1 HTTP
0x0059FE88 92 1 crypto_handle_table
0x00BF1B6C 84 1 HTTP
0x020B0808 80 1 hulc_flash init
0x00363AB4 76 1 Parser Linkage
0x002FD83C 68 1 AAA MI SG NAME
0x0038785C 68 1 Parser Mode Q1
0x00387880 68 1 Parser Mode Q2
Dead Proc Summary for: I/O
PC Total Count Name
Dead Proc Summary for: Driver text
PC Total Count Name
Switch1#show memory debug leak
Adding blocks for GD...
Driver text memory
Address Size Alloc_pc PID Alloc-Proc Name
I/O memory
Address Size Alloc_pc PID Alloc-Proc Name
处理or memory
Address Size Alloc_pc PID Alloc-Proc Name
Switch1#
不幸的是,“显示内存调试泄漏”没有发现任何存在泄漏问题的进程。
我能够找到来自的帖子 由于hulc_flash而导致的高内存利用率 to mention CSCth60511和CSCua52463 与该泄漏有关。升级似乎可以解决此问题,但是如果升级后问题得以解决,他没有发布。
这是我从中搜索到的 思科Bug搜索网站 并且存在三个相关的错误:
![]() |
思科Bug搜索工具 |
![]() |
思科Bug搜索工具的结果 |
4.1 CSCth60511 – 在hulc_flash初始化过程中看到内存泄漏
在启动时,交换机可能会为hulc_flash init泄漏少量内存
处理
更多信息:
由于泄漏很小,因此不会对功能造成任何影响。

产品: |
(1)
|
已知受影响的版本: |
(4)
|
已知的固定版本: |
(23)
|
不幸的是,我们的设备是2960x,运行在15.0(2)EX3上,与该错误所说的不同。
4.2 CSCua52463 – C2960 –死存储器中的内存泄漏–无法通过telnet / ssh进行切换
在多个交换机上观察到问题。
arnsw0034#sh mem死了
总头数(b)已使用(b)空闲(b)最低(b)最大(b)
处理器25D8FA0 23727744 19629156 4098588 3362220 4034820
I / O 2C00000 4194304 2473496 1720808 1646820 1609296
驱动程序te 1800000 1048576 44 1048532 1048532 1048532
--——–
arnsw0034#sh proc内存
处理器池总数:23727744已使用:19628532免费:4099212
I / O池总数:4194304已使用:2473356免费:1720948
驱动程序池总计:1048576使用:40免费:1048536
PID TTY分配的释放控股Getbufs Retbufs流程
0 0 22527504 4649688 14708156 0 0 *初始化*
0 0 3014844 1663092 1290864 3804375 1341026 *死*
150 0 14687348 8409544 659316 2268 0授权管理器
71 0 736300 143256 472556 0 0堆栈经理通知
0 0 0 0 394484 0 0 * MallocLite *
157 0 25864596 43517164 335060 0 0 EAP框架
179 0 2289784 23580 261832 0 0 CDP协议
57 0 198956 1686364 208516 0 0 EEM ED ND
--——–
从“显示内存已死”,我们可以看到一个过程不断增加:
…
026A5598 0000000056 026A5538 026A55F8 001 ——– ——– 000196E0 hulc_flash init
026A55F8 0000000056 026A5598 026A5658 001 ——– ——– 000196E0 hulc_flash init
026A5658 0000000040 026A55F8 026A56A8 001 ——– ——– 005360BC hulc_flash init
026A56A8 0000000028 026A5658 026A56EC 001 ——– ——– 00539ED0 hulc_flash init
026A56EC 0000000044 026A56A8 026A5740 001 ——– ——– 00E4C48C hulc_flash init
…

产品: |
(104)
|
4.3 CSCua52463 – C2960 –死存储器中的内存泄漏–无法通过telnet / ssh进行切换
hulc_flash在3750G上进行dot1x测试期间看到的init和init内存泄漏
条件:
在3750G交换机上配置或不配置任何dot1x,都可以看到此问题。即使使用默认配置也可以观察到这一点。
解决方法:
对此没有解决方法。
进一步的问题描述:

产品: |
(143)
|
解
遗憾的是,尽管我们发现了错误 CSCua52463 似乎完全符合我们的情况,Cisco不会发布任何解决方案并对其进行修复。
降级到12.2或升级到15.2(2)E3 这是我们目前要尝试的最后一步。实际升级到15.2(2)E3可以解决此问题。
这是来自NetMRI的监视信息。将IOS升级到15.2(2)E3之后,可用内存变得稳定。它每分钟缓慢减少,直到升级到15.2(2)E3。
类型: | 切换(99%) | 供应商: | 思科公司 |
操作系统版本: | 15.2(2)E3 | 模型: | catWsC2960x48tsLL |
正常运行时间: | 1d 00h 17m 42s | SNMP状态: | 已启用 |
上次通讯: | 2017-03-27 10:13:30 | MAC地址: | 5C:A4:8A:5C:70:C1 |
发现停电: | 不适用 | 更改停电: | 不适用 |
![]() |
监视工具中的可用交换机内存状态 |
参考: