On 23 March 2011 18:37, Donald Russell <[email protected]> wrote:
> If the nsExtendRunType is run-on-read, then any snmpget of the output values
> will run the command and return the results (or just return the cached
> results without running the command)
Correct.
> If the nsExtendRunType is "run-on-set", then ...
> the command is NOT run until also set nRunType to run-command(3).
Correct
> So, let;s say I have a command I want to run in either of two ways:
> 1 - with no arguments, the command returns some data
> 2 - with arguments, the command changes something, based on the arguments
>
> Using snmp to get the results of my custom query, I should
> snmpget nsExtendOutputFull."myname"
Yes.
> then to effect a change, I would
> snmpset nsExtendArgs."myname" = "new args" nsExtendRunType = 3
> then
> snmpset nsExtendArgs."myname" = ""
That's one approach, certainly.
> If that's the case, I think it will be better for me to have two extensions,
> one to get and another to change.
That would be my preference, yes.
> So then the process becomes...
> snmpget nsExtendOutputFull."mygetname""
>
> snmpset nsExtendAgs."mysetname" = "new string args" nsRunType."mysetname" = 3
And of course, if the arguments are fixed, then any subsequent
invocations would just need to be
snmpset nsExtendRunType."mysetname" = 3
> OK, that's cool.... is there a way to define a run-on-set item in the config
> file?
:
> GOT IT!
> extend name command
> extendfix name command
Zigactly
Dave
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders