Re: To many open files

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 19 May 2010 11:00, Daniel Stålnacke <[email protected]> wrote:
> I'm using snmp to read status once every secound from a device and after
> about 10 min I get an error which say that I have to many open files. I have
> tried to find the error and close about anything I can find, but the problem
> remains.


I would suggest that you pull the overall initialisation
   (snmp_sess_init()  through to init_mib())
and the overall cleanup
   (snmp_close() through to shutdown_mib())

out of this function, and invoke them once at the start/end
of your application.   That's the most likely cause of the leaks
that you are seeing.

Dave

------------------------------------------------------------------------------

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.