Skip to content

Persistent_Storage_Does_Not_Get_Updated_Immediately

Bill Fenner edited this page Aug 30, 2018 · 1 revision

Question

When I make a dynamic modification to the snmp agent it does not immediately update the /var/net-snmp/snmpd.conf file with the new data (example: user password changes, new trap destinations, vacm changes, etc).

If the snmpd crashed, or some one did a "kill -9", all my changes are lost.

Answer

You're right! It doesn't update it right away. This is primarily because it was originally conceived as an expensive operation and not worth doing right away. The agent will save the data upon a proper shutdown, but it won't if it doesn't shutdown properly.

Note: You should never kill -9 any daemon except as a last resort!!

Solution: Force a Save

You can, actually, force the snmpd daemon to save the data. To do this, send a set request to versionSavePersistentData.0 with an integer value of 1.

 snmpset HOST versionSavePersistentData.0 = 1

This will force an immediate save of the data.

Category:agent Category:persistence

Clone this wiki locally