Tuesday, July 19, 2011

SNMP FAQ

Q. Why using a named pipe?
A. Because the healthcheck socket port has to be known by both the SNMP agent and WATCH, and this way this is transparent for the user (otherwise configureSnmp would have needed to be updated to ask (still) another port to the user, which was not a good solution).

Q. Why a double (named pipe / socket) mechanism to exchange information with the agent?
A. The named pipe / socket pair has been used because a full duplex named pipe (which would have seemed a simple solution) is not possible due to blocking issues in java.

Q. Does it perturb the SNMP agent classical queries?
A. Tests have shown that the additional 1 ms. timeout per query in the agent is not perceptible by the user.

Q. Why does the SNMP agent re-transmit the healthcheck socket port every (WATCH health cycle – 1) requests?
A. If WATCH ever crashes, and the SNMP agent would never re-transmit the port, the health check of the SNMP agent would never be able again.
(WATCH health cycle – 1) is used because it allows re-establishing the connection just below the health cycle allowance of WATCH.

Q. If WATCH cannot read (for any reason) from the named pipe every time the SNMP agent writes into it, what about the information stored in the pipe (garbage)?
A. When WATCH reads from the named pipe, it reads all the information available from it. It the SNMP agent has written multiple times, then this information won’t be usable, correct. But next time the SNMP agent will write into it, the port information will be clean.