Difference between revisions of "Template:FAQ:Compiling 07"

From Net-SNMP Wiki
Jump to: navigation, search
 
m (5.4 release synchronisation)
Line 1: Line 1:
 +
<!-- NB:
 +
  There is a mismatch between the template numbering
 +
  for this entry, and the FAQ entries that refer to it.
 +
  This follows a review of the entries in the
 +
  Compiling section.
 +
-->
 
In order to reduce the memory footprint (for instance, to
 
In order to reduce the memory footprint (for instance, to
 
embed the snmpd into a device), the following configure options
 
embed the snmpd into a device), the following configure options

Revision as of 14:42, 29 December 2006

In order to reduce the memory footprint (for instance, to embed the snmpd into a device), the following configure options could be used.

 '--disable-debugging'

This turns off the compilation of all debugging statements.

 '--enable-mini-agent' '--with-out-mib-modules=examples/ucdDemoPublic'

This creates an agent with just the essential MIB modules included. NOTE: If you need additional MIB modules, then simply add them using the option '--with-mib-modules=...' but this will of course increase the memory footprint.

 '--with-transports=UDP'

This option specifies the transport domains to include. For a simple standalone agent, just UDP should be sufficient. (Although the 'disman' and 'agentx' modules may require the Callback, TCP and/or Unix transport domains as well).

 '--without-kmem-usage'

This can be used in order to omit the code that operates on the /dev/kmem interface. Clearly, this option cannot be used when one of the configured MIB modules depends on it.

 '--with-mibdirs=' and '--with-mibs='

These options tell the agent not to load any MIB modules. This doesn't affect the size of libraries or application binaries, but will reduce the memory footprint during runtime.

 '--disable-mib-loading'

This can be used in order to omit the code that loads and parses the MIB files altogether. This will reduce both the runtime memory footprint, and the binary sizes.

Once the agent (snmpd) has been linked, you might also try running 'strip snmpd' to remove un-necessary debug/symbol information.