Hi 
I have tried communicating b/w agent and client using dynamic module (.so)  
creation for snmp agent.
snmpget and snmpset working fine . But after restart/reset the agent does not 
retain  value  . it shows the  previous value which has been defined in .c 
(generated through mib2c) file.   
 Is there any mechanism defined in SNMP to retain last value??
if not , Any idea how it can  be done.??
1.Bill suggested to use  register_config_handler() to register a function that 
will parse a persistent storage file line with the data you wrote, and use  
snmp_register_callback( SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, ... ) 
to register a function that will save your data to the persistent file. 
(Required more detail..)
2.Or we can  a  writing a shell script in agent,say  SNMP_save.sh . When we are 
done with our changes from client at last we need to invoke this script in 
agent from client 
This script, SNMP_save.sh will read all custom objects and make another shell 
script in agent itself which will set value to these latest values.
We call this script snmp_reload_last.sh.Last step is hooking this 
snmp_reload_last.sh to startup sequence of agent, so the last values which were 
set are automatically reconfigured.
Thanks
 
 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to