RE: Reducing the size of libnetsnmp, libnetsnmphelpers etc lib files
"Srivastava, Namburi (IE10)" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <0BE793E111BFFF449DFB3207E2977BE01C5BE5@IE10EV812.global.ds.honeywell.com> |
I made these changes in the Makefiles Remove the -g option from CFLAGS and (no debug information included) Include -s --static for LDFLAGS The size of the library files has drastically reduced. Libnetsnmpmibs.a 533 KB Libnetsnmpagent.a 113 KB Libnetsnmphelpers.a 112 KB Libnetsnmp.a 650 KB This is with just the following option ./configure --with-perl-modules and then do the above mentioned changes to the makefiles. But the Sub-agent (fully functional) I built with these library files is still of the same size as it used to be with earlier libraries. So still my problem is half solved... Not sure why Regards, Sri. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield Sent: Thursday, January 11, 2007 2:17 PM To: Srivastava, Namburi (IE10) Cc: [email protected] Subject: Re: Reducing the size of libnetsnmp, libnetsnmphelpers etc lib files On 09/01/07, Srivastava, Namburi (IE10) <[email protected]> wrote: > Also one more observation is, using any of these configure options > Except for --disable-debugging, I havent' seen significant reduction in > size of libnetsnmphelpers.a and libnetsnmp.a... Am I missing something > here? There's probably not much you can do to reduce the size of the helpers library. Most of that is fairly core to the operation of the agent. You *might* be able to remove individual helpers if there are no MIBs that require them, but I doubt there's a configure option to do this for you. You'd have to work out which helpers were safe to use by trial-and-error. If you manage to come up with a list, please let us know, so we can update the documentation accordingly. I would have thought that: --disable-mib-loading --disable-snmpv1 --disable-snmpv2c should reduce the size of the main library slightly - though probably not by a great deal. Similarly for the other --disable-FEATURE options (see "configure --help" for a full list). Not loading the MIBs would probably make more difference to the run-time memory usage of the agent/tools, rather than the size of the library itself. Dave ------------------------------------------------------------------------- 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