Well that's sort of a good sign. It means that there was nothing wrong with your original code and the problem must be elsewhere. I am not sure if $result has any meaningful information but it may be worthwhile to print $result each time through the loop. Additionally, have you checked out the
? The only other thing I can suggest is turn the SNMP logging for the server you are setting on way up and tail the log.