Difference between revisions of "Template:FAQ:Applications 14"

From Net-SNMP Wiki
Jump to: navigation, search
(5.4 release synchronisation)
m (Latest FAQ revision - preparing for 5.5 release)
 
Line 17: Line 17:
 
         snmpset -v 2c -c public localhost -- versionRestartAgent.0 i -1
 
         snmpset -v 2c -c public localhost -- versionRestartAgent.0 i -1
  
(This will also fail, since -1 isn't an acceptable value for this
+
(This command will still fail, since -1 isn't an acceptable value for this
 
particular object, but that's not the point here!)
 
particular object, but that's not the point here!)

Latest revision as of 09:52, 28 May 2009

This is a different problem. What's happening here is that the routine that parses the arguments to the 'snmpset' command is seeing the '-' of the new value, and treating it as a command-line option. This normally generates an error (since digits typically aren't valid command line option).

The easiest way to solve this is include the "end-of-option" indicator '--' in the command line, somewhere before the new value (but after all of the options, obviously). For example:

       snmpset -v 2c -c public localhost -- versionRestartAgent.0 i -1

(This command will still fail, since -1 isn't an acceptable value for this particular object, but that's not the point here!)