Technical Tip: High CPU Usage by the SNMPD Process
Description
This article describes an issue where the FortiGate exhibits high CPU usage by the SNMPD process when SNMP monitoring is enabled.
Scope
FortiGate.
Solution
The SNMPD daemon is consuming high CPU, resulting in the FortiGate being unable to respond to SNMP queries.
diagnose sys top 10 4
Run Time: 0 days, 6 hours and 48 minutes
0U, 0N, 2S, 98I; 1000T, 618F, 120KF
snmpd 226 R 99.4 1.3
ipsengine 116 S < 0.0 5.1
scanunitd 218 S < 0.0 3.6
scanunitd 219 S < 0.0 3.6
The following errors may be seen in the snmpd debug output, indicating that snmp-index is the same for both interfaces:
diagnose debug application snmpd -1
diagnose debug enable
.
snmpd: Device created kernel-index=12, snmp-index=6, name=wan1
snmpd: Creating interface for wan1
snmpd: Device created kernel-index=13, snmp-index=6, name=wan2
snmpd: Creating interface for wan2
The SNMP index for the interface can be verified using the command below:
show system interface
config system interface
edit "wan1"
set vdom "root"
set ip 192.168.1.99 255.255.255.0
set allowaccess ping https ssh snmp http fgfm
set type physical
set description "WAN1"
set snmp-index 1
next
edit "wan2"
set vdom "root"
set ip 192.168.2.99 255.255.255.0
set allowaccess ping https ssh http fgfm auto-ipsec
set type physical
set description "WAN2"
set snmp-index 1
next
config system interface
edit "wan2"
set snmp-index <>
next
Once the SNMP index has been changed, kill the daemon using the command 'fnsysctl killall snmpd' or reboot the unit. Once this is done, the SNMPD daemon’s CPU usage should return to normal.
Note:
High CPU usage by the SNMPD daemon can also occur when the SNMP index is the same for multiple VDOMs. Command 'show system vdom-property' can be used to verify the SNMP index for each VDOM.
Use the following commands to modify the SNMP index for each VDOM:
config system vdom-property
edit <VDOM_NAME>
set snmp-index <>
end
