RE: calling init_mib() to reload SNMP MIBs
Samer Vazdekis <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Actually, I did try it. I am seeing a memory leak. So, I called unload_all_mibs() first, unfortunately I got a crash!. I'm running net-snmp version 5.2.1.2. What is the ideal way to reload the mibs dynamically?. Is it by calling read_all_mibs()?. I noticed the only calling read_all_mibs() does not work. Need to call add_mibdir() before!. #0 0x68cde52f in thr_kill () from /usr/lib32/libc.so.6 #1 0x689507be in _thr_send_sig () from /usr/lib32/libthr.so.2 #2 0x689483bf in raise () from /usr/lib32/libthr.so.2 #3 0x68d59ee2 in abort () from /usr/lib32/libc.so.6 #4 0x68cf8b5e in _UTF8_init () from /usr/lib32/libc.so.6 #5 0x68cf8ba6 in _UTF8_init () from /usr/lib32/libc.so.6 #6 0x68cf9b00 in _UTF8_init () from /usr/lib32/libc.so.6 #7 0x68cf9d3c in _UTF8_init () from /usr/lib32/libc.so.6 #8 0x68cf9e72 in free () from /usr/lib32/libc.so.6 #9 0x68ad9f74 in free_tree (Tree=0x6) at parse.c:883 #10 0x68adbb4d in unload_module_by_ID (modID=51, tree_top=0x906cd80) at parse.c:3962 #11 0x68adbd70 in unload_all_mibs () at parse.c:4026 > Date: Thu, 25 Jun 2009 08:20:03 +0100 > Subject: Re: FW: calling init_mib() to reload SNMP MIBs > From: [email protected] > To: [email protected] > CC: [email protected] > > 2009/6/24 Samer Vazdekis <[email protected]>: > > I am simply calling init_mib() from my signal handler. This is not working for > > me!. .... Am I missing somthing?. > > init_mib is designed to be called *once*. > If called a second time, it will simply return immediately. > > > > > I managed to reload MIB file. But instead calling init_mib(), I'm calling > > the following functions, > > > > add_mibdir("/usr/local/share/snmp/mibs/"); > > init_mib_internals(); > > Again, init_mib_internals is also designed to be called *once*, > and if called a second time, will simply return immediately. > You can safely omit this. > > > > read_all_mibs(); > > > > > > I'm afraid however that I might get a memory leak! > > Well test it, then! > Monitor the memory usage of a quiescent agent, > while repeatedly signalling it to re-load the MIBs. > > It should be fairly clear whether this leaks memory or not. > > > > >. Should I call unload_all_mibs() before?. > > Again - suck it and see. > > If you've got a question like this ("what happens if...."), > it's best to actually try it out for yourself, and see what happens. > > Dave _________________________________________________________________ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047 ------------------------------------------------------------------------------ _______________________________________________ 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