On Fri, 1 Jun 2007 09:27:24 -0500 [EMAIL PROTECTED] wrote: EYC> I have another CLI process to control enable/disable the subagent traps EYC> configuration. Currently I made the CLI work by snmpset the trap EYC> configuration objects and save the p tokens in the permanent subagent .conf EYC> file. This is working successfully to turn on/off subagent traps EYC> generation. EYC> EYC> My question came from how to make the CLI modify /etc/snmp/subagent.conf EYC> tokens and then the subagent re-read them. Based on what you wrote, my EYC> question is then how to let the CLI generate SIGHUP signal once EYC> /etc/snmp/subagent.conf is updated.
Well, as Dave and Thomas pointed out, first you have to make sure the app is catching sighup to handle it properly. As for the cli, it could use 'killall -HUP subagentName', or use ps + grep to find the process name. Another option would be to modify the subagent code to explicitly check the file modification time periodically, and re-read the config file via the same library calls the hup handling uses. then you won't need to send a signal at all. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
