我知道此线程很旧,但出于完整性考虑:
如果高CPU随机发生,并且您无法确定导致此问题的过程,我们可以在下面创建脚本。
使用此脚本,当流程的上升幅度超过正常阈值或预期阈值时,我们将广泛捕获流程,这不应中断任何流量,但仍建议使用MW。但是我看到您将其范围缩小为RPD。
snmp {
health-monitor {
interval 30;
rising-threshold 60;
falling-threshold 50;
}
}
event-options {
policy MONITOR-CPU {
events snmpd_health_mon_thresh_cross;
attributes-match {
snmpd_health_mon_thresh_cross.event-name matches "Health Monitor.+CPU.+rising";
}
then {
execute-commands {
commands {
"show system processes extensive";
}
output-filename cpu-processes;
destination local-flash;
output-format text;
}
}
}
destinations {
local-flash {
archive-sites {
/var/tmp;
}
}
}
}
显示设置输出>
set snmp health-monitor interval 30
set snmp health-monitor rising-threshold 60
set snmp health-monitor falling-threshold 50
set event-options policy MONITOR-CPU events snmpd_health_mon_thresh_cross
set event-options policy MONITOR-CPU attributes-match snmpd_health_mon_thresh_cross.event-name matches "Health Monitor.+CPU.+rising"
set event-options policy MONITOR-CPU then execute-commands commands "show system processes extensive"
set event-options policy MONITOR-CPU then execute-commands output-filename cpu-processes
set event-options policy MONITOR-CPU then execute-commands destination local-flash
set event-options policy MONITOR-CPU then execute-commands output-format text
set event-options destinations local-flash archive-sites /var/tmp
您是否还检查了是否已报告任何ddos消息?您可以运行以下命令:
show ddos-protection protocols statistics brief
show ddos-protection statistics
show ddos-protection version
然后根据您看到的内容缩小范围,例如:
show ddos-protection protocols ttl statistics
show ddos-protection protocols ttl violations
show ddos-protection protocols ttl flow-detection detail */*this cm needs prior config*/*
瞻博网络还根据KB22637提供了此类问题的收集列表
高CPU
CLI命令
set cli timestamp
show chassis routing-engine (multiple snapshots, atleast 5)
show system processes extensive (multiple snapshots atleast 5)
show system users
show system connections
show system statistics
打开任务记帐并收集任务记帐明细输出(三次,间隔30秒)。完成后不要忘记将其关闭。
set task accounting on
show task accounting detail
set task accounting off
show task memory detail
show task memeory summary
show task io
show task history
show task statistics
show task job
show task jobs
show krt queue
show krt state
日志
按照上述Traceoptions的步骤1中的说明归档/ var / log
user@router# show routing-options
traceoptions {
file routing-trace size 10m files 20 world-readable;
flag task;
flag state;
flag timer;
}
另外,如果您正在运行的旧版本容易出现错误,则可能需要检查代码的生命周期支持:
http://www.juniper.net/support/eol/junos.html
值得一提的另一点可能是媒介攻击,它没有保护您的RE免受不必要的异常流量的侵害。确保环回下有防火墙过滤器。
我过去曾在路由器上看到导致高CPU使用率的脚本,但不确定rpd是否进入了我的视野,但这是您可能不想忽略的事情。
如果您在日志中看到许多RPD_MPLS_PATH_BANDWIDTH_CHANGE的匹配,则您使用的调整间隔可能非常大
检查“显示系统队列”上的所有内容:这是内核队列,可能会出现一些提示。