Multithreading with single api
David Ulrich <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have written a small code in C to poll switchs in a fiber optic network. I must get counters values on this switchs for each port. I have threaded the code in order to be able to poll 200 switchs in some minutes. I notice that with more than 4 threads I have a lot of SNMP timeout. It's quite strange because the machine source is on a recent Blade Center, the network is fiber and the switch are quite strong. I poll one switch with one thread. With 5 threads I poll 5 switchs at the same time. For the moment I just have 8 switchs on all network and I poll only one port counter for each switch. I use : snmp_sess_init( &session ); session.timeout = 2000000; session.retries = 5; session.version = SNMP_VERSION_2c; snmp_synch_setup(&session); sess_handle = snmp_sess_open(&session) snmp_sess_synch_response(sess_handle, pdu, &response) snmp_synch_reset(&session); snmp_sess_close(sess_handle) Is there something I miss? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users