防火墙cpu 这周开始长期保持在70%左右,导致上网卡顿,有啥排查cpu 高原因吗?谢谢大家
(0)
最佳答案
您好,参考
连续使用命令display cpu-usage查看CPU的占用率。如果CPU占用率持续在70%以上,说明有某个任务长时间占用CPU,需要确认CPU高的具体原因。
<Sysname> display cpu-usage
Slot 1 CPU 0 CPU usage:
70% in last 5 seconds
70% in last 1 minute
70% in last 5 minutes
本类故障的常见原因主要包括:
· 路由振荡
· 报文攻击
· 链路环路
本类故障的诊断流程如图5所示:
图5 CPU占用率高故障诊断流程图
(1) 检查是否发生路由振荡
路由表中条目频繁变化,可能导致CPU占用率过高。当发生路由震荡时,请收集信息并联系H3C技术人员寻求技术支持。
首次查看路由表:
[Sysname] display ip routing-table
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 OSPF 150 1 11.2.1.1 Vlan100
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
再次查看路由表:
[Sysname] display ip routing-table
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
(2) 检查是否受到报文攻击
部分机型Probe视图下支持debug rxtx softcar show命令,可以查看软件收包是否堵塞丢包。
<Sysname> system-view
[Sysname] probe
[Sysname-probe] debug rxtx softcar show slot 1
ID Type RcvPps Rcv_All DisPkt_All Pps Dyn Swi Hash ACLmax
0 ROOT 0 0 0 300 S On SMAC 0
1 ISIS 0 0 0 200 D On SMAC 8
2 ESIS 0 0 0 100 S On SMAC 8
3 CLNP 0 0 0 100 S On SMAC 8
4 VRRP 0 0 0 1024 S On SMAC 8
5 UNKNOWN_IPV4MC 0 0 0 100 S On SMAC 8
6 UNKNOWN_IPV6MC 0 0 0 100 S On SMAC 8
7 IPV4_MC_RIP 0 0 0 150 D On SMAC 8
8 IPV4_BC_RIP 0 0 0 150 D On SMAC 8
9 MCAST_NTP 0 0 0 100 S On SMAC 8
10 BCAST_NTP 0 0 0 100 S On SMAC 8
如果某类报文的统计计数在不断增长,说明有攻击存在,可通过抓包确认攻击源。在设备端口抓包,使用报文捕获工具(如Sniffer、Wireshark、WinNetCap等)分析报文特征,确认攻击源。然后针对攻击源配置报文防攻击。关于报文防攻击的详细介绍和配置,请参见“安全配置指导”中的“攻击检测与防范”。
(3) 检查是否存在链路环路
链路存在环路时,可能出现广播风暴和网络振荡,大量的协议报文上送CPU处理可能导致CPU占用率升高,设备很多端口的流量会变得很大,端口使用率达到90%以上:
<Sysname> display interface gigabitethernet3/0/1
GigabitEthernet3/0/1
Current state: UP
Line protocol state: UP
Description: GigabitEthernet3/0/1 Interface
Bandwidth: 1000000 kbps
Maximum transmission unit: 1500
Internet address: 2.1.1.2/24 (primary)
IP packet frame type: Ethernet II, hardware address: 0000-fc00-9276
IPv6 packet frame type: Ethernet II, hardware address: 0000-fc00-9276
Loopback is not set
Media type is twisted pair, port hardware type is 1000_BASE_T
Port priority: 0
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Last clearing of counters: Never
Peak input rate: 8 bytes/sec, at 2016-03-19 09:20:48
Peak output rate: 1 bytes/sec, at 2016-03-19 09:16:16
Last 300 second input: 26560 packets/sec 123241940 bytes/sec 99%
Last 300 second output: 0 packets/sec 0 bytes/sec 0%
……
如链路出现环路:
¡ 排查链路连接、端口配置是否正确。
¡ 对于二层口,是否使能STP协议,配置是否正确。
¡ 对于二层口,邻接设备STP状态是否正常。
¡ 如以上配置均正确,可能为STP协议计算错误或协议计算正确但端口驱动层没有正常Block阻塞,可以shutdown环路上端口、拔插端口让STP重新计算来快速恢复业务。
(4) 确定CPU占用率高的任务
如果通过上述步骤无法解决故障,请通过display process cpu命令观察占用CPU最多的任务。
<Sysname> display process cpu slot 1
CPU utilization in 5 secs: 2.4%; 1 min: 2.5%; 5 mins: 2.4%
JID 5Sec 1Min 5Min Name
1 0.0% 0.0% 0.0% scmd
2 0.0% 0.0% 0.0% [kthreadd]
3 0.0% 0.0% 0.0% [migration/0]
4 0.0% 0.0% 0.0% [ksoftirqd/0]
5 0.0% 0.0% 0.0% [watchdog/0]
6 0.0% 0.0% 0.0% [migration/1]
7 0.0% 0.0% 0.0% [ksoftirqd/1]
8 0.0% 0.0% 0.0% [watchdog/1]
9 0.0% 0.0% 0.0% [migration/2]
10 0.0% 0.0% 0.0% [ksoftirqd/2]
11 0.0% 0.0% 0.0% [watchdog/2]
……
各列分别表示某任务平均5sec、1min、5min占用CPU的百分比和任务名。某任务占用率越高,说明相应的任务占用CPU的资源越多。正常情况任务对CPU的占用率一般低于5%,这个命令可以查看明显高出正常占用率的任务。
(5) 确认异常任务的调用栈
通过Probe视图下的follow job job-id命令确认异常任务的调用栈,请查询5次以上,发送给技术支持人员分析,以便于分析该任务具体在做什么处理导致CPU占用率持续升高。此处以显示JID 145的调用栈为例。
<Sysname> system-view
[Sysname] probe
[Sysname-probe] follow job 145 slot 1
Attaching to process 145 ([dGDB])
Iteration 1 of 5
------------------------------
Kernel stack:
[<ffffffff80355290>] schedule+0x570/0xde0
[<ffffffff80355da8>] schedule_timeout+0x98/0xe0
[<ffffffff802047e4>] ep_poll+0x4b4/0x5e0
[<ffffffffc05587a8>] DRV_Sal_EVENT_Read+0x1f8/0x290 [system]
[<ffffffffc07351e4>] drv_sysm_gdb_console+0xc4/0x2d0 [system]
[<ffffffffc1a04114>] thread_boot+0x84/0xa0 [system]
[<ffffffff8015c420>] kthread+0x130/0x140
[<ffffffff801183d0>] kernel_thread_helper+0x10/0x20
Iteration 2 of 5
------------------------------
Kernel stack:
[<ffffffff80355290>] schedule+0x570/0xde0
[<ffffffff80355da8>] schedule_timeout+0x98/0xe0
[<ffffffff802047e4>] ep_poll+0x4b4/0x5e0
[<ffffffffc05587a8>] DRV_Sal_EVENT_Read+0x1f8/0x290 [system]
[<ffffffffc07351e4>] drv_sysm_gdb_console+0xc4/0x2d0 [system]
[<ffffffffc1a04114>] thread_boot+0x84/0xa0 [system]
[<ffffffff8015c420>] kthread+0x130/0x140
[<ffffffff801183d0>] kernel_thread_helper+0x10/0x20
Iteration 3 of 5
------------------------------
Kernel stack:
[<ffffffff80355290>] schedule+0x570/0xde0
[<ffffffff80355da8>] schedule_timeout+0x98/0xe0
[<ffffffff802047e4>] ep_poll+0x4b4/0x5e0
[<ffffffffc05587a8>] DRV_Sal_EVENT_Read+0x1f8/0x290 [system]
[<ffffffffc07351e4>] drv_sysm_gdb_console+0xc4/0x2d0 [system]
[<ffffffffc1a04114>] thread_boot+0x84/0xa0 [system]
[<ffffffff8015c420>] kthread+0x130/0x140
[<ffffffff801183d0>] kernel_thread_helper+0x10/0x20
Iteration 4 of 5
------------------------------
Kernel stack:
[<ffffffff80355290>] schedule+0x570/0xde0
[<ffffffff80355da8>] schedule_timeout+0x98/0xe0
[<ffffffff802047e4>] ep_poll+0x4b4/0x5e0
[<ffffffffc05587a8>] DRV_Sal_EVENT_Read+0x1f8/0x290 [system]
[<ffffffffc07351e4>] drv_sysm_gdb_console+0xc4/0x2d0 [system]
[<ffffffffc1a04114>] thread_boot+0x84/0xa0 [system]
[<ffffffff8015c420>] kthread+0x130/0x140
[<ffffffff801183d0>] kernel_thread_helper+0x10/0x20
Iteration 5 of 5
------------------------------
Kernel stack:
[<ffffffff80355290>] schedule+0x570/0xde0
[<ffffffff80355da8>] schedule_timeout+0x98/0xe0
[<ffffffff802047e4>] ep_poll+0x4b4/0x5e0
[<ffffffffc05587a8>] DRV_Sal_EVENT_Read+0x1f8/0x290 [system]
[<ffffffffc07351e4>] drv_sysm_gdb_console+0xc4/0x2d0 [system]
[<ffffffffc1a04114>] thread_boot+0x84/0xa0 [system]
[<ffffffff8015c420>] kthread+0x130/0x140
[<ffffffff801183d0>] kernel_thread_helper+0x10/0x20
(6) 如果故障仍然未能排除,请收集如下信息,并联系技术支持人员。
¡ 上述步骤的执行结果。
¡ 设备的配置文件、日志信息、告警信息。
无
· CPU_STATE_NORMAL
· CPU_MINOR_RECOVERY
· CPU_MINOR_THRESHOLD
· CPU_SEVERE_RECOVERY
· CPU_SEVERE_THRESHOLD
(0)
你好,根据命令,先排查job 190 ,如下显示 [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3f8>] F1000_WaitPkt+0x98/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 4 of 5 ------------------------------ Kernel stack: [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 4 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 5 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000
display process cpu命令用来显示所有进程的CPU使用率信息。
【命令】
(独立运行模式)
display process cpu [ slot slot-number [ cpu cpu-number ] ]
(IRF模式)
display process cpu [ chassis chassis-number slot slot-number [ cpu cpu-number ] ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【参数】
slot slot-number:表示单板所在的槽位号。不指定该参数时,表示主用主控板。(独立运行模式)
chassis chassis-number slot slot-number:chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。不指定该参数时,表示全局主用主控板。(IRF模式)
cpu cpu-number:表示CPU的编号。
【举例】
# 显示所有进程CPU使用率信息。
<Sysname> display process cpu
CPU utilization in 5 secs: 16.8%; 1 min: 4.7%; 5 mins: 4.7%
JID 5Sec 1Min 5Min Name
1 0.0% 0.0% 0.0% scmd
2 0.0% 0.0% 0.0% [kthreadd]
3 0.1% 0.0% 0.0% [ksoftirqd/0]
其它显示信息略……。
表1-8 display process cpu命令显示信息描述表
字段 | 描述 |
CPU utilization in 5 secs: 16.8%; 1 min: 4.7%; 5 mins: 4.7% | 系统最近5秒CPU使用率;最近1分钟CPU使用率;最近5分钟CPU使用率 |
JID | 任务编号(用于唯一标识一个进程,该编号不会随着进程的重启而改变) |
5Sec | 最近5秒钟内进程的CPU使用率 |
1Min | 最近1分钟内进程的CPU使用率 |
5Min | 最近5分钟内进程的CPU使用率 |
Name | 进程名称(如果进程名称带有“[ ]”标记,则表示该进程为内核线程) |
(0)
感谢,根据命令显示job 190 ,帮忙分析下谢谢了 [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3f8>] F1000_WaitPkt+0x98/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 4 of 5 ------------------------------ Kernel stack: [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 4 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 5 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000
感谢,根据命令显示job 190 ,帮忙分析下谢谢了 [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3f8>] F1000_WaitPkt+0x98/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 4 of 5 ------------------------------ Kernel stack: [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 4 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 5 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
你好,根据命令,先排查job 190 ,如下显示 [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3f8>] F1000_WaitPkt+0x98/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe008490c>] work_f1000_RxRngMsg+0x7c/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 4 of 5 ------------------------------ Kernel stack: [fx-yzm-fw1080-probe]follow job 190 slot 1 Attaching to process 190 ([kdrvdp2]) Iteration 1 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 2 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 [<ffffffffe007e3e8>] F1000_WaitPkt+0x88/0xd0 [system] [<ffffffffe0084f04>] work_f1000_RxRngMsg+0x674/0xda0 [system] [<ffffffff80267bc0>] kthread+0x140/0x150 [<ffffffff8021c600>] kernel_thread_helper+0x10/0x20 Iteration 3 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 4 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000 Iteration 5 of 5 ------------------------------ Kernel stack: [<ffffffff804aa884>] schedule+0x6c4/0x1000