SMA includes the following content for developers:
Developer tools, and Perl modules needed by the tools
API libraries for using Net-SNMP functions
API library for using the Entity MIB functions
Demo modules, for demonstrating how to implement some types of data modeling
In addition, you can install the SUNWsmaS package, which contains the source code for Net-SNMP. See the Solaris System Management Agent Administration Guide for installation instructions.
The developer files are installed in the locations that are shown in the following table.
Table 1–1 File Locations for Developer Content
Directory |
Developer Content |
---|---|
/usr/demo/sma_snmp |
Sample modules for demonstration purposes. See Demonstration Modules for more information. |
/usr/sfw/bin |
Command line tools that are useful for developers. For more information on these tools, see SMA Tools. |
/usr/sfw/sbin |
Executable files for the snmpd agent daemon and snmptrapd trap daemon, which provide the SNMP services. |
/usr/sfw/lib |
The 32-bit shared libraries that contain the API functions from Net-SNMP, and the libentity.so library, which defines functions for using the Entity MIB. This directory is supplied on all Solaris platforms. See API Libraries for more information. |
/usr/sfw/lib/sparcv9 |
The 64-bit shared libraries that contain the API functions from Net-SNMP, and the libentity.so library, which defines functions for using the Entity MIB. This directory is supplied only on 64-bit Solaris on SPARC® platforms. See API Libraries for more information. |
/usr/sfw/include |
Header files needed by API libraries. |
/usr/sfw/doc/sma_snmp/html |
HTML documentation for Net-SNMP API functions. |
/etc/sma/snmp |
Configuration files that are used by the mib2c tool. |
/etc/sma/snmp/mibs |
The MIBs supported by the System Management Agent. |
/usr/perl5/vendor_perl/5.8.3/sun4-solaris-64int |
Perl modules needed by the mib2c tool. |
/usr/share/sma_snmp |
Source code for Net-SNMP. The code is provided in the SUNWsmaS package, which is not installed by default during Solaris installation. The package must be installed manually from the Solaris media. For instructions for installing the SUNWsmaS package, see the Solaris System Management Agent Administration Guide. |
The SMA includes many command-line tools, which are described in the sma_snmp(5) man page.
Each tool has an associated man page. Links to all the man pages for the product are included in Appendix A, SMA Resources. The tools are located in /usr/sfw/bin.
The snmp commands can be used to query the agent to test your modules. Read the man pages for detailed usage information.
The following API libraries are included with the SMA product:
libnetsnmp
libnetsnmpagent
libnetsnmpmibs
libnetsnmphelpers
libentity
The libentity library is not part of Net-SNMP, but is a customization for the SMA product.
On SPARC platforms, the 32–bit Net-SNMP libraries are contained in the /usr/sfw/lib directory. The 64–bit Net-SNMP libraries are contained in the /usr/sfw/lib/sparcv9 subdirectory.
On x86 platforms, only the 32–bit Net-SNMP libraries are available in the /usr/sfw/lib directory.
The functions contained in the Net-SNMP libraries are used in the MIB modules that you create, as well as in the agent. Documentation from Net-SNMP for using the API functions is contained in /usr/sfw/doc/sma_snmp/html.
The SMA includes the same Net-SNMP API functions that are available with the open source Net-SNMP agent. API Functions includes a list of functions that are certified to work with the System Management Agent.
The /usr/demo/sma_snmp directory contains several demonstration modules. The demo modules illustrate methods for creating modules to solve various kinds of information-gathering problems. Later chapters in this manual discuss the demo modules in detail. The following table lists and describes the demo modules. The table also provides cross-references to the sections that discuss the demos.
Table 1–2 Descriptions of Demonstration Modules
Module Name |
Demonstrates |
Discussed in Section |
---|---|---|
demo_module_1 |
Data modeling for scalar objects | |
demo_module_2 |
Data modeling for a simple table with writable objects | |
demo_module_3 |
Data modeling for a general table | |
demo_module_4 |
Implementing alarms | |
demo_module_5 |
Persistence of module data across agent restarts | |
demo_module_6 |
Running multiple instances of a module on a single host | |
demo_module_7 |
Dynamically updating multi-instance modules | |
demo_module_8 |
Implementing a module as an AgentX subagent | |
demo_module_9 |
Implementing objects that wait for external events without blocking the agent | |
demo_module_10 |
Module design that handles long running data collections so that their values can be polled by an SNMP manager | |
demo_module_11 |
How to use the Entity MIB API functions | |
demo_module_12 |
How use Solstice Enterprise Agents code templates and SMA code templates to help re-implement Solstice Enterprise Agents subagents as SMA modules |
Technical support for developers of modules for the System Management Agent is provided through the Net-SNMP open source community at http://www.net-snmp.org. You might find the developers discussion mailing list net-snmp-coders@lists.sourceforge.net to be helpful. An archive for the mailing list is located at http://sourceforge.net/mailarchive/forum.php?forum_id=7152.