net-snmp API and connection error handling

net-snmp has a strange API that does not seem to allow us to detect errors while trying to connect to the master snmpd instance. When playing around with python-netsnmpagent, create a copy of run_simple_agent.sh named test.sh and modify as follows: agentXsocket tcp:localhost:9000 or similar. Do not change the python simple_agent.py line by intent. Running test.sh… Continue reading net-snmp API and connection error handling

python-agentx: Add signal handlers for INT and TERM

And another patch for python-agentx: this one adds signal handlers for signals INT and TERM. This is necessary because python-agentx implements the main loop for your agent, anyway. Then it should also deal with termination handling when the agent either runs in foreground, ie. not daemonized, and CTRL-C is used to interrupt the main loop,… Continue reading python-agentx: Add signal handlers for INT and TERM