I have been trying to Google this for three days with no luck, here is my problem...
I am developing an application that does certain scripted functions for our helpdesk and networking groups and delivers the results via web interface. An example of some of the functionality is port status of a switch, router error tracking, performance monitoring, utilization...that kind of stuff. I'm using snmp to do pretty much everything and it works great and all is good except when 2 users try and do something invoking snmp calls at the exact same time. I did a line sniff to see what the deal was and this is what happens as an example:
User (A) requests port speed/duplex settings for a switch on the network, php starts sending out the snmpget calls needed...
User (😎 initiates a check for router errors a split second after User (A), while User (A)'s script is still doing its thing. The instant User(😎
does this User(A) stops making the needed snmp calls and just stops. They then need to close out of their web browser and log back in.
User (😎's request completes without a problem.
I am guessing this is caused by contention for the snmp port and php gets confused. What I don't get is I have some scripts that rely on telnet and they all go out on port 23 and can run at the same time with no problem, why not snmp? My google searches turned up AgentX and smux protocols, but I could not really tell if they are relevant to my problem. Am I trying to do something that snmp is not capable of?
The only idea I had for a work around for this is anytime PHP goes to do an snmp query it can check to see if port 161 is in use, and if it is sleep for a period of time and then try again. Does that sound like it would work? Any input would be greatly appreciated, thanks.
I am running the following configuration on windows 2003
Apache version 2.2.0
PHP version 5.1.2
MySQL version 5.0.18