To work around this issue:
-
- Check if SNMP is creating too many
.trp
files in the /var/spool/snmp
directory on the ESXi host by running the command:
ls /var/spool/snmp | wc -l
Note: If the output indicates that the value is 2000 or more, this may be causing the full inodes.
- Note: Ensure you keep a backup copy of the files in a shared datastore before you delete the trap files.
Delete the .trp
files in the /var/spool/snmp/
directory by running the commands:
# cd /var/spool/snmp
# for i in $(ls | grep trp); do rm -f $i;done
- Change directory to
/etc/vmware/
and back up the snmp.xml
file by running the commands:
# cd /etc/vmware
# mv snmp.xml snmp.xml.bkup
- Create a new file named
snmp.xml
and open it using a text editor. For more information, see Editing files on an ESX host using vi or nano (1020302). - Copy and paste these contents to the file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<config>
<snmpSettings><enable>false</enable><port>161</port><syscontact></syscontact><syslocation></syslocation>
<EnvEventSource>indications</EnvEventSource><communities></communities><loglevel>info</loglevel><authProtocol></authProtocol><privProtocol></privProtocol></snmpSettings>
</config>
- Save and close the file.
- Reconfigure SNMP on the affected host by running the command:
# esxcli system snmp set –-enable=true
- To confirm the SNMP services are running normally again, run the command:
# esxcli system snmp get
Here is an example of the output:
/etc/vmware # esxcli system snmp get
Authentication: Communities: Enable: true Engineid: 00000063000000a10a0121cf Hwsrc: indications Loglevel: info Notraps: Port: 161 Privacy: Remoteusers: Syscontact: Syslocation: Targets: Users: V3targets:
To ensure that the issue does not recur, you can temporarily disable
snmpd
to stop logging. To stop the
snmpd
service, run this command:
# /etc/init.d/snmpd stop