Well, a year back I developed an agent module for net-snmp to monitor disk usage/statistics.开发者_如何学Go It was locally installed on a system in LAN.
Now, I intend to use the same module for my Home PC and to trap over it from office.. But my ISP does not provide me a 'static IP' and its expensive to own one.
Over the last week-end I found out 'no-ip.org' can help me out to setup a virtual static IP using Dynamic IP (Just stole its working-logic, simple)
Anyways, Here is what I did! I wrote a program that will check for present running IP in my system and update me through a mail and it also inserts the same to my snmpd.conf file.
I do not know how to make 'snmpd' to re-read the configuration file without restarting the snmpd service.
After spending lot of time on google I found I can use 'kill -SIGHUP <snmpd-pid>
'
But will this ever help me out in re-reading the .conf file? SIGHUP would terminate the process, generally speaking...
How would I do this if I ever wanted to re-read the .conf file without restarting the snmpd daemon?
From the snmpd.conf man page:
The Net-SNMP agent can be instructed to re-read the various configuration files, either via an snmpset assignment of integer(1) to UCD-SNMP-MIB::versionUpdateConfig.0 (.1.3.6.1.4.1.2021.100.11.0), or by sending a kill -HUP signal to the agent process.
精彩评论