今天突然发现一台4507R的cpu利用率一直在50%左右,但总流量也就在
70Mbps左右,仔细阅读《High CPU Utilization on Cisco IOS Software-Based Catalyst
4500 Switches》后才知道一个大概排查的过程。过程如下:
1. 蛋蛋先发现了4500的cpu利用率很高
# sho proc c | ex 0.00
CPU utilization for five seconds: 42%/12%; one minute: 26%; five minutes: 23%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
27 16 1920 8 0.15% 0.09% 0.08% 0 Per-Second Jobs
29 21040 65370 321 2.63% 2.91% 2.84% 0 Cat4k Mgmt HiPri
30 326016 4341509 75 26.63% 15.44% 14.29% 0 Cat4k Mgmt LoPri
58 336 3211 104 0.07% 0.03% 0.01% 0 IP Input
61 1192 534 2232 0.47% 1.13% 0.33% 1 Virtual Exec
会发 现Cat4k Mgmt LoPri占用的cpu最多。
2. 继续往下查
#sho platform health
%CPU %CPU RunTimeMax Priority Average %CPU Total
Target Actual Target Actual Fg Bg 5Sec Min Hour CPU
Lj-poll 1.00 0.02 2 0 100 500 0 0 0 0:00
GalChassisVp-review 3.00 0.13 10 18 100 500 0 0 0 0:01
S2w-JobEventSchedule 10.00 0.15 10 25 100 500 0 0 0 0:04
Stub-JobEventSchedul 10.00 0.40 10 2 100 500 0 0 0 0:04
StatValueMan Update 1.00 0.01 1 0 100 500 0 0 0 0:00
Pim-review 0.10 0.01 1 0 100 500 0 0 0 0:00
Ebm-host-review 1.00 0.00 8 0 100 500 0 0 0 0:00
Ebm-port-review 0.10 0.00 1 0 100 500 0 0 0 0:00
Protocol-aging-revie 0.20 0.00 2 0 100 500 0 0 0 0:00
Acl-Flattener 1.00 0.00 10 1 100 500 0 0 0 0:00
KxAclPathMan create/ 1.00 0.00 10 5 100 500 0 0 0 0:07
KxAclPathMan update 2.00 0.00 10 1 100 500 0 0 0 0:00
KxAclPathMan reprogr 1.00 0.00 2 0 100 500 0 0 0 0:00
TagMan-RecreateMtegR 1.00 0.00 10 3 100 500 0 0 0 0:00
K2CpuMan Review 30.00 60.56 30 15 100 500 115 104 14 15:57
K2AccelPacketMan: Tx 10.00 49.86 20 0 100 500 87 76 10 11:18
K2AccelPacketMan: Au 0.10 0.00 0 0 100 500 0 0 0 0:00
K2AclMan-taggedFlatA 1.00 0.00 10 1 100 500 0 0 0 0:00
好了,又发现K2CpuMan Review和K2AccelPacketMan了。K2CpuMan
Review意为软件转发,即转发过程需要调用cpu。K2AccelPacketMan这个进程表示把数据包从cpu转发的接口。好了,现在已经大概知
道是一些数据包再作怪。进入下一步。
3. 查看那些端口上来的数据需要cpu来处理。
#debug platform packet all count
platform packet debugging is on
#sho platform cpu packet statistics
Packets Received at CPU per Input Interface
Interface Total 5 sec avg 1 min avg 5 min avg 1 hour avg
---------------------- --------------- --------- --------- --------- ----------
Gi3/1 3321 214 24 0 0
Gi7/1 2 0 0 0 0
Te1/1 692 54 6 0 0
看到没gi3/1上来的数据,每秒有214个数据包需要cpu来处理。那么来看看是具体是什么数据吧。
4. 有2种方法可以查看是哪些数据包导致了cpu利用率过高。
方法1:
#monitor session 1 source cpu
#monitor session 2 destination interface gigabitEthernet 7/10
之后拿个笔记本接到gi7/10上,再开个omnipack就ok 了。
方法2:
#debug platform packet all receive buffer
#sho platform cpu packet buffered
Total Received Packets Buffered: 110
-------------------------------------
Index 0:
0 days 0:45:58:482359 - RxVlan: 1006, RxPort: Te1/1
Priority: Normal, Tag: No Tag, Event: L3 Forward, Flags: 0x440, Size: 64
Eth: Src 00-16-9D-4E-63-00 Dst 00-16-47-88-B6-3F Type/Len 0x0800
Ip: ver:4 len:20 tos:0 totLen:40 id:37110 fragOffset:0 ttl:59 proto:tcp
src: 58.135.192.21 dst: 211.153.14.225 firstFragment lastFragment
Remaining data:
0: 0xE 0xC2 0x0 0x17 0x26 0x72 0x80 0xB3 0x6B 0x35
10: 0x10 0x86 0x50 0x10 0x3F 0x1B 0x61 0xE8 0x0 0x0
20: 0x0 0x0 0x0 0x0 0x0 0x0 0xB 0xB9 0x2 0x57
Index 1:
0 days 0:46:1:441673 - RxVlan: 1015, RxPort: Gi7/7
Priority: Normal, Tag: No Tag, Event: L2 Forward, Flags: 0x40, Size: 64
Eth: Src 00-E0-FC-12-D9-CA Dst FF-FF-FF-FF-FF-FF Type/Len 0x9001
Remaining data:
0: 0x0 0x0 0x17 0x3 0x35 0x26 0xE0 0x90 0x1 0x0
10: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
20: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
30: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
40: 0x0 0x0 0x0 0x0 0x0 0x0 0xCC 0x44 0x9 0x27
阅读(2868) | 评论(0) | 转发(0) |