[AGENT++] SNMP++ Session Create Fail, SNMP++: Resource unavailable

Frank Fock fock at agentpp.com
Thu Feb 3 01:04:25 CET 2005


Hi,

It seems that you have reached the maximum number of ports/handles
you are allowed to hold on your system. It would be wiser to start
less threads and rather asynchronously process requests and responses.

Best regards,
Frank


??? wrote:

>Hi everybody!
>
>Now I met a problem about snmp program development when using snmp++v3.2.15.
>
>I use the SNMP Get operation to find the alive snmp agent devices.My program code framework is as follows:
>
> #define MAX_PTHREAD_NUM 254
> 
> void* snmpPingPong(void* args)
> //args contains the possible IPv4 address
> {
>	if the specified device which is identified by the args can be reachable by snmp,
>    then add it to a global queue object(of cource using mutext when writing the specified IP address to queue).
>   
> }
>
> void funcA(char* netaddress,char*netmask)
> {
>   for(int i=0;i<MAX_PTHREAD_NUM;i++)
>      pthread_create();
>   for(int i=0;i<MAX_PTHREAD_NUM;i++)
>      pthread_join();   
> }
>
> And now in main function,I execute funcA for several time,for examples,I gave the parameters <192.168.1.0 255.255.255.0>?
>
><192.168.2.0 255.255.255.0>?<192.168.3.0 255.255.255.0>?<192.168.4.0 255.255.255.0>?<192.168.5.0 255.255.255.0>?
>
><192.168.6.0 255.255.255.0> and even more.
>
>During execution,it firstly shows snmpGet error(because of timeout and it is resulted by dead device,And it is right.No problem).
>
>but later,if shows "SNMP++ Session Create Fail, SNMP++: Resource unavailable"
>
>
>Any idea? 
>
>Can you show me a hand?
>
>Regards!
>
> hfwu at seu.edu.cn
>
>
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://agentpp.org/mailman/listinfo/agentpp
>
>  
>





More information about the AGENTPP mailing list