======================================================================== * README.solaris ======================================================================== README.solaris $Id$ This document describes issues relating to compiling, installing and using net-snmp on Solaris. 0. Introduction 1. Things you will need 2. Disabling Sun's SNMP daemons 3. Compiling net-snmp 4. Obtaining and installing binaries 5. Creating snmpd.conf and testing 6. Creating your own binaries 7. Using Sun's SNMP daemon and net-snmp together 8. Monitoring disks, processes and execs (DISMAN-EVENT-MIB) 9. Monitoring CPU temp, fan and power supply sensors (LM-SENSORS-MIB) 10. MIB rewrites for IF-MIB, TCP-MIB and UDP-MIB Additional compilation issues: 11. Files descriptors and fopen 12. Perl 13. sed 14. OpenSSL and crle 15. IPv6 16. Wish list Other issues: 17. Known Bugs!! 18. Discussion and further information ------------------------------------------------------------ 0. Introduction This document is a compilation of information relating to running net-snmp (www.net-snmp.org) on Sun SPARC and Ultra hardware under the Solaris operating system. This can be done either in conjunction with or as a replacement for Sun's SNMP daemons. This is discussed in detail in the sections below. Since this is the work of several authors, credit is given. Discussion, however, should take place on the net-snmp-users or net-snmp-coders mailing lists so everybody can benefit. See http://sourceforge.net/mail/?group_id=12694 . Use "net-snmp-users" for general usage questions and "net-snmp-coders" for discussion of net-snmp source code. No warranty is implied by this document. This document is copyright but usage allowed under the same licensing as net-snmp in general. See http://www.net-snmp.org/COPYING.txt. ------------------------------------------------------------ 1. Things you will need A. Root access Root access is required to follow pretty much any of the steps below. At a bare minimum, you will need to be able to start and stop daemons, which requires root (at least for the default ports). B. Determine existing SNMP functionality SNMP uses ports 161 and 162 by default. Only one application can use them at a time. If there is an existing SNMP application (eg. Sun's snmpdx daemon) you need to either turn this off or work around it. You may also have a previous version of net-snmp, the older ucd-snmp, or something completely different. The following commands: ps -ef | grep snm ps -ef | grep mibi will give you a fairly good idea what is going on. If you see something like: root 643 1 0 Jan 16 ? 5:49 /usr/local/sbin/snmpd that's probably a version of net-snmp. The instructions in various sections below should give you clues on what to do next. If you see something like: root 16178 1 0 13:16:04 pts/2 0:00 /usr/lib/snmp/snmpdx -y -c /etc/snmp/conf and/or root 21371 1 0 Feb 07 ? 0:52 mibiisa -r -p 41178 then Sun's SNMP daemons are running. If you need this, for example if you use the Solstice Enterprise Agent, you may wish to run net-snmp as a sub-agent (see section 7). Otherwise, you will need to disable Sun's daemons (see section 2). Regardless you may wish to compile net-snmp from source and install it (see sections 3, 5 and 6) or install binaries (see sections 4 and 5). If some other SNMP daemon is running, you will need to determine where it came from and what it's being used for. You get clues by typing "snmpd -v" or "snmpd --help". In some cases it may be a subagent or agent from another application, such as ORACLE. If you disable its agent, you will need to re-create this functionality under net-snmp (eg. by running it as a sub-agent). ORACLE's SNMP functionality is turned on by default and may be unnecessary if you aren't using ORACLE's Enterprise Manager. Refer to ORACLE's documentation on how to disable it. If you have decided to compile your own net-snmp, you will need ... C. A compilation environment -a compiler (gcc or Sun's Forte cc) or the gcc libraries (note, the cc in /usr/ucb is NOT a full-blown compiler) -OpenSSL (sunfreeware.com or source www.openssl.org) -zlib (sunfreeware.com or source www.gzip.org/zlib/) -an SNMP community string ("public" is deprecated) If you are installing on a development machine, it may be best to compile OpenSSL and zlib from source, otherwise obtain the appropriate zlib for your platform from sunfreeware and install (it goes to /usr/local automatically). Obtain the appropriate OpenSSL for your platform from sunfreeware and install (it goes to /usr/local), you may need the gcc libraries. These libraries should not need to be installed if you are using binaries, but your mileage may vary. Note the library problem with libcrypto noted below (section 14). There are two choices for compilers. Sun has a Forte development suite that includes a standalone C compiler. If you have it, it is likely installed in /opt/SUNWspro/bin. The more common choice is gcc (2.95.3 or better have been tested) available from sunfreeware.com. If you install gcc, you do not need the gcc libraries. 3.3.2 or later is recommended. Given that net-snmp is developed to work on a wide variety of platforms, but especially for linux, there's a better chance of it working using gcc at any given time. We also do regular test builds with Sun cc, though. -- Bruce Shaw -- Thomas Anders ------------------------------------------------------------ 2. Disabling Sun's SNMP daemons Note: Sun has started to include net-snmp (version 5.0.9 plus their patches) with Solaris 10 and later. These instructions are written with Solaris 9 and previous in mind. Out of the box, Sun runs four SNMP daemons: mibiisa, idmispd, snmpXdmid and snmpdx. These must be disabled before running net-snmp unless you are planning on running them together (see Section 7 below). Here is the procedure: cd /etc/rc3.d ./S76snmpdx stop ./S77dmi stop mv S76snmpdx s76snmpdx mv S77dmi s77dmi If you are using Solstice Disksuite, you may also be running mdlogd. Leave this alone. You will need to create a new script to start net-snmp. See dist/snmpd-init.d and dist/snmptrapd-init.d for templates. -- Bruce Shaw ------------------------------------------------------------ 3. Compiling net-snmp It is strongly recommended that you compile net-snmp from source. That way you are guaranteed a working version for your specific configuration of operating system, applications and libraries. If, for some reason, you cannot compile on a specific machine, there are binaries available for download (see section 4). In addition, you may create your own binaries (see section 6). You need to set your $PATH. This is extremely important because otherwise there may be conflicts between the various components of the development environment. If you are using FORTE: PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/local/bin: If you are using gcc (installed in /usr/local/bin): PATH=/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/bin Obtain a current version of net-snmp (which, if you're reading this, presumably you have - don't you love recursion?) www.net-snmp.org/download/ Uncompress it and untar it in a working directory eg. /usr/local/src/net-snmp In order to save a lot of typing, you should create a "configure" script eg. bcc.sh in the directory below eg. /usr/local/src. ./configure --with-mib-modules="ucd-snmp/lmSensors ucd-snmp/diskio \ smux mibII/mta_sendmail" --with-cc=gcc (note, see the long discussion about Perl below) (note, substitute "cc" for "gcc" as appropriate) (note, for LM-SENSORS-MIB support, see discussion below) then call this script from the net-snmp directory ie ../bcc.sh and answer the appropriate questions (usually with the default). When it completes, you should see something like: --------------------------------------------------------- Net-SNMP configuration summary: --------------------------------------------------------- Net-SNMP Version: 5.4 Building for: solaris2 Network transport support: Callback Unix TCP UDP SNMPv3 Security Modules: usm Agent MIB code: mibII ucd_snmp snmpv3mibs notification target \agent_mibs agentx agent_mibs utilities host disman/event-mib \ucd-snmp/diskio smux agentx mibII/mta_sendmail SNMP Perl modules: disabled Embedded perl support: disabled Authentication support: MD5 SHA1 Encryption support: DES Type: make and watch for compile errors. You will receive numerous warnings. This is normal, a side effect of supporting a variety of development environments. Now type: make test and watch for failures. Also watch for the special tests for Solaris. If you are satisfied with the tests, stop any snmpd daemons that may be running (see section 2) and type: make install When complete, go on to section 5 below. -- Bruce Shaw ------------------------------------------------------------ 4. Obtaining and installing binaries It is strongly recommended that you compile net-snmp from source. That way you are guaranteed a working version for your specific configuration of operating system, applications and libraries. Binaries for Solaris may be found in two locations. www.sunfreeware.com - this installs as a package. It does not have Perl support. Therefore, I recommend: http://net-snmp.sourceforge.net/download/ (you will be redirected) This is the official repository for binaries. To determine which binary you need, you will need several pieces of information. -operating system version, -hardware platform -net-snmp version desired The first two may be obtained by typing: uname -a It will return something like: SunOS foo 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-4 5.8 means Solaris 8 5.7 means Solaris 7 etc. "sun4u" is the Ultra hardware platform "sun4m" is SuperSPARC eg. Sparc 5 or Sparc 10 "sun4d" is older SPARC boxes. You can then decode the binary version by its name eg.: net-snmp_5.0.9-SunOS_5.8_sun4u.tar.gz means "net-snmp version 5.0.9 for Solaris 8 running on Ultra hardware". Once you have found the appropriate version, download it to a distribution directory (making one if necessary) eg. /usr/local/dist Type the following: (using the sample above) cd / tar -xvf /usr/local/dist/net-snmp-5.0.9-SunOS_5.8_sun4u.tar The binaries, libraries, etc. will be installed in /usr/local. Remove the tar file to save space. Create an snmpd.conf (see below) or use an existing one from another machine. It installs in /usr/local/share/snmp. Install a startup script (see section 1). For further information, see README.solaris.binaries.x that ships with the binaries. --Bruce Shaw ------------------------------------------------------------ 5. Creating snmpd.conf and testing When everything is installed, run: snmpconf -g basic_setup and answer the questions appropriately. If you are using the defaults, place the resulting snmpd.conf file in: /usr/local/share/snmp/snmpd.conf A security note - use of the "public" community is deprecated. This example uses "whatever" as a community. When you have the daemon running either with the script above or running: /usr/local/sbin/snmpd test the daemon's functionality by typing: snmpget -v 1 -c whatever localhost sysUpTime.0 snmpwalk -v 2c -c whatever -m ALL localhost .1.3 | more and paging through the results. If you have problems, you can examine diagnostic messages by running: /usr/local/sbin/snmpd -f -Le or use gdb (available from www.sunsolve.com) as follows: cd /usr/local/sbin gdb snmpd run -f -Le and when it blows up: bt to get the backtrace. You can use: run -f -Le -D to display debug messages. To display all debug messages type: run -f -Le -D ALL but this will be extremely verbose. -- Bruce Shaw with suggestions by Thushara Wickram ------------------------------------------------------------ 6. Creating your own binaries Pick an appropriate name for a tarfile eg. net-snmp-5.4.custom-SunOS_5.8_sun4u.tar (see above) (this particular one means "a customized version of net-snmp 5.4 that works under Solaris 8 running on Ultra hardware") Create an empty directory such as /usr/local/dist, then do the following from the source directory (using the example above): make install prefix=/usr/local/dist/usr/local \ exec_prefix=/usr/local/dist/usr/local cd /usr/local/dist tar -cvf net-snmp-5.4.custom-SunOS_5.8_sun4u.tar usr Transfer this file to the machine where you want to install from binary. Place it in a distribution directory eg. /usr/local/dist Type the following (using the example above): cd / tar -xvf /usr/local/dist/net-snmp-5.4.custom-SunOS_5.8_sun4u.tar Remove the tar file to save space. Create an snmpd.conf (see above) or use an existing one from another machine. If you are using the defaults, it installs in /usr/local/share/snmp. Install a startup script (see section 2). Note that if you create a binary with Perl support (see below) an identically configured Perl needs to be installed as well. -- Bruce Shaw ------------------------------------------------------------ 7. Using Sun's SNMP daemon and net-snmp together Net-SNMP may be used as a subagent in conjunction with Sun's snmpdx daemon. To do this, you will need to modify several files, all located in /etc/snmp/conf. First, do the following: /etc/rc3.d/S76snmpdx stop (assuming you haven't done so already, and...) /etc/rc3.d/S77dmi stop (...assuming you haven't renamed them) cd /etc/snmp/conf cp snmpd.conf snmpd.conf.orig cp snmpdx.acl snmpdx.acl.orig cp snmpdx.reg snmpdx.reg.orig cp snmpdx.rsrc snmpdx.rsrc.orig cp mibiisa.reg mibiisa.reg.orig cp mibiisa.rsrc mibiisa.rsrc.orig modify snmpd.conf with the correct: sysdescr syscontact sysLocation system-group-read-community read-community (in my example below I will use community "whatever") trap trap-community managers (leave blank for all) modify snmpdx.acl with the correct: trap-community trap-recipients communities access Make sure that in snmpdx.reg the port is 161. You will now need to add two files - net-snmp.reg and net-snmp.rsrc In this example, "subtrees" is set for HOST-RESOURCES-MIB, and UCD-SNMP-MIB. Do not use net-snmp's MIB-2 information as this is already provided by Sun's mib and may cause a conflict. ::::: net-snmp.reg :::::: # net-snmp.reg # mib-2 is already provided by the mibiisa process # that is a default sub agent of snmpdx # we are specifying only hostmib and ucd ########## # agents # ########## # The following 3 macros are predefined: # # mib-2 = 1.3.6.1.2.1 # enterprise = 1.3.6.1.4.1 # sun = 1.3.6.1.4.1.42 # # You can define your own macros, so that you can # manipulate strings instead of OIDs in defining the agent. # See the "agent" section below. macros = { host = mib-2.25 ucd = enterprise.2021 } agents = { { name = "net-snmp" subtrees = { host,ucd } timeout = 2000000 watch-dog-time = 86400 } } :::::::::::::::::: ::::: net-snmp.rsrc :::::: # /etc/snmp/conf/net-snmp.rsrc resource = { { registration_file = "/etc/snmp/conf/net-snmp.reg" policy = "spawn" type = "legacy" command = "/usr/local/sbin/snmpd $PORT" } } :::::::::::::::::: Stop any net-snmp processes that may be running. Start Sun's daemons by typing: /etc/rc3.d/S76snmpdx start (assuming you haven't renamed it) /etc/rc3.d/S77dmi start (assuming you haven't renamed it) Wait a moment for everything to stabilize, then try these two queries: snmpget -v 1 -c whatever localhost sysDescr.0 snmpget -v 1 -c whatever localhost hrSystemUptime.0 You should see something like: SNMPv2-MIB::sysDescr.0 = STRING: SunOS foo 5.6 Generic_105181-30 sun4u which is Sun's daemon talking, and: HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (78540910) 9 days, 2:10:09.10 which is net-snmp talking. It is acting as a sub-agent through Sun's daemon. If Sun's daemons fail, you will need to shut down the snmpd daemons by typing: pkill snmpd Then do the following: /etc/rc3.d/S76snmpdx stop (assuming you haven't renamed it) /etc/rc3.d/S77dmi stop (assuming you haven't renamed it) /etc/rc3.d/S76snmpdx start (assuming you haven't renamed it) /etc/rc3.d/S77dmi start (assuming you haven't renamed it) rather than trying to individually clobber all the various Sun daemons. This configuration appears to deal properly with snmpgets and handle mistakes gracefully. Beyond this, your mileage may vary. You may wish to modify the subtrees in net-snmp.reg as you find things that do and don't work. Remember to keep backup copies of working configurations. -- Bruce Shaw from notes by Stefan Radman and C Wells ------------------------------------------------------------ 8. Monitoring disks, processes and execs (DISMAN-EVENT-MIB) Important note: this section only applies to the old DISMAN-EVENT-MIB implementation called "disman/event-mib", *not* the current "disman/event" mib module which is active by default since net-snmp 5.3 and later. For a full explanation of using DISMAN-EVENT-MIB, see: http://www.net-snmp.org/man/snmpd.conf.html To use this component, net-snmp must be compiled with the option.. --with-mib-modules="disman/event-mib" This discussion concerns the use of DISMAN-EVENT-MIB with Solaris. There is a bug preventing the use of some of its functionality. This discussion will document what is known to work and how to use it. The problem revolves around the use of monitors. The... defaultMonitors yes token will NOT work for reasons discussed below. I suspect that the notificationEvent tokens will not work for the same reason but this has not been tested. Your mileage may vary. Same with includeAllDisks. The documentation suggests using... monitor -o prNames -o prErrMessage "process table" prErrorFlag != 0 to monitor all processes. This will fail with ambiguous results. To monitor processes, put a separate monitor line for each process. For example: ###### proc smail proc mdlogd monitor -r 30 -i -o prNames.1 -o prErrMessage.1 "Process smail" prErrorFlag.1 !=0 monitor -r 30 -i -o prNames.2 -o prErrMessage.2 "Process Solstice Disksuite SNMP trap" prErrorFlag.2 !=0 To monitor disks, do the same. An example: ######## # This example sends a trap if root has less than 10% available and /usr6 less t han 90% # disk / 10% disk /usr6 90% monitor -i -r 30 -o dskPath.1 -o dskErrorMsg.1 "root file system" dskErrorFlag.1 !=0 monitor -i -r 30 -o dskPath.2 -o dskErrorMsg.2 "ORACLE file system" dskErrorFlag.2 != 0 ######### To implement an external program then monitor its results you need to set up your script. Here is a sample script. #!//usr/bin/ksh xstatus=0 if [ $xstatus -eq 0 ];then echo success: $0 else echo FAILURE: $0 fi exit $xstatus ###end of script tester## Place this script in /usr/local/src and make it executable. Make copies called tester1, tester2 etc. and make them executable. Here is a sample snmpd.conf snippet that makes use of the exec feature: ############## exec tester1 /usr/local/src/tester1 exec tester2 /usr/local/src/tester2 exec tester3 /usr/local/src/tester3 exec tester4 /usr/local/src/tester4 exec tester5 /usr/local/src/tester5 monitor -i -r 60 -o extNames.1 -o extOutput.1 "status table 1" extResult.1 != 0 monitor -i -r 60 -o extNames.2 -o extOutput.2 "status table 2" extResult.2 != 0 monitor -i -r 60 -o extNames.3 -o extOutput.3 "status table 3" extResult.3 != 0 monitor -i -r 60 -o extNames.4 -o extOutput.4 "status table 4" extResult.4 != 0 monitor -i -r 60 -o extNames.5 -o extOutput.5 "status table 5" extResult.5 != 0 ############## While snmpd is running, go to /usr/local/src and modify one of the tester programs eg. tester1 xstatus=1 and save the file. Sometime in the next 60 seconds, a trap will be generated. Change the value back to 0, then modify another file. If you are unsure of the correct row number within a specific table, do an snmpwalk eg. snmpwalk -v 2c -c public -m ALL localhost prNames The same methodology can presumably be used for fileName and laNames. Your mileage may vary. -- Bruce Shaw with Allan McIntosh and Wes Hardaker ------------------------------------------------------------ 9. Monitoring CPU temp, fan and power supply sensors (LM-SENSORS-MIB) Note: This module (ucd-snmp/lmSensors) works in "read only" mode to examine sensors. It cannot change switch or fan settings. It has been tested at least on the following platforms: Enterprise 450 V880 280R If you have information about other platforms this is desperately needed. For example, the only "state" that I'm aware of for an i2c is "OK". The more information we have, the richer the components. Please report any performance statistics, bugs or omissions to the users list. Please report any code suggestions to the coders list. See links below. This component delivers information that you would normally see by typing: /usr/platform/`uname -m`/sbin/prtdiag -v At present this is only supported on the Ultra (sun4u) platform. To display this information, net-snmp must be compiled with the option: --with-mib-modules="ucd-snmp/lmSensors" Early Ultra servers such as the Ultra 1 or Ultra 2 did not report any sensor information at all. Later servers, such as the Enterprise 450 reported this information using kstat. Sun's latest servers make use of the picld daemon to control system resources and report fan information. This module reads in the information from picld. It cannot modify settings. You can see this information by typing: prtpicl -v | more The following is typical output from net-snmp: E450# snmpwalk -v 2c -c public -m ALL localhost lmSensors LM-SENSORS-MIB::lmTempSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmTempSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmTempSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmTempSensorsIndex.4 = INTEGER: 3 LM-SENSORS-MIB::lmTempSensorsDevice.1 = STRING: Ambient LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: CPU1 LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: CPU2 LM-SENSORS-MIB::lmTempSensorsDevice.4 = STRING: CPU3 LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 22 LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 45 LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 46 LM-SENSORS-MIB::lmTempSensorsValue.4 = Gauge32: 49 LM-SENSORS-MIB::lmFanSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmFanSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmFanSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmFanSensorsDevice.1 = STRING: fan type CPU number 0 LM-SENSORS-MIB::lmFanSensorsDevice.2 = STRING: fan type PWR number 0 LM-SENSORS-MIB::lmFanSensorsDevice.3 = STRING: fan type AFB number 0 LM-SENSORS-MIB::lmFanSensorsValue.1 = Gauge32: 33 LM-SENSORS-MIB::lmFanSensorsValue.2 = Gauge32: 31 LM-SENSORS-MIB::lmFanSensorsValue.3 = Gauge32: 63 LM-SENSORS-MIB::lmVoltSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmVoltSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmVoltSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmVoltSensorsDevice.1 = STRING: power supply 0 LM-SENSORS-MIB::lmVoltSensorsDevice.2 = STRING: power supply 1 LM-SENSORS-MIB::lmVoltSensorsDevice.3 = STRING: power supply 2 LM-SENSORS-MIB::lmVoltSensorsValue.1 = Gauge32: 38 LM-SENSORS-MIB::lmVoltSensorsValue.2 = Gauge32: 39 LM-SENSORS-MIB::lmVoltSensorsValue.3 = Gauge32: 39 LM-SENSORS-MIB::lmMiscSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmMiscSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmMiscSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmMiscSensorsDevice.1 = STRING: FSP LM-SENSORS-MIB::lmMiscSensorsDevice.2 = STRING: Backplane4 LM-SENSORS-MIB::lmMiscSensorsDevice.3 = STRING: Backplane8 LM-SENSORS-MIB::lmMiscSensorsValue.1 = Gauge32: 192 LM-SENSORS-MIB::lmMiscSensorsValue.2 = Gauge32: 0 LM-SENSORS-MIB::lmMiscSensorsValue.3 = Gauge32: 0 V880# snmpwalk -v 2c -c public -m ALL localhost lmSensors LM-SENSORS-MIB::lmTempSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmTempSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmTempSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmTempSensorsIndex.4 = INTEGER: 3 LM-SENSORS-MIB::lmTempSensorsIndex.5 = INTEGER: 4 LM-SENSORS-MIB::lmTempSensorsIndex.6 = INTEGER: 5 LM-SENSORS-MIB::lmTempSensorsIndex.7 = INTEGER: 6 LM-SENSORS-MIB::lmTempSensorsIndex.8 = INTEGER: 7 LM-SENSORS-MIB::lmTempSensorsIndex.9 = INTEGER: 8 LM-SENSORS-MIB::lmTempSensorsIndex.10 = INTEGER: 9 LM-SENSORS-MIB::lmTempSensorsDevice.1 = STRING: CPU0_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: CPU2_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: CPU1_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.4 = STRING: CPU3_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.5 = STRING: CPU4_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.6 = STRING: CPU6_DIE_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.7 = STRING: MB_AMB_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.8 = STRING: IOB_AMB_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.9 = STRING: DBP0_AMB_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsDevice.10 = STRING: DBP1_AMB_TEMPERATURE_SENSOR LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 71 LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 60 LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 66 LM-SENSORS-MIB::lmTempSensorsValue.4 = Gauge32: 59 LM-SENSORS-MIB::lmTempSensorsValue.5 = Gauge32: 65 LM-SENSORS-MIB::lmTempSensorsValue.6 = Gauge32: 69 LM-SENSORS-MIB::lmTempSensorsValue.7 = Gauge32: 28 LM-SENSORS-MIB::lmTempSensorsValue.8 = Gauge32: 25 LM-SENSORS-MIB::lmTempSensorsValue.9 = Gauge32: 25 LM-SENSORS-MIB::lmTempSensorsValue.10 = Gauge32: 24 LM-SENSORS-MIB::lmFanSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmFanSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmFanSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmFanSensorsIndex.4 = INTEGER: 3 LM-SENSORS-MIB::lmFanSensorsIndex.5 = INTEGER: 4 LM-SENSORS-MIB::lmFanSensorsIndex.6 = INTEGER: 5 LM-SENSORS-MIB::lmFanSensorsIndex.7 = INTEGER: 6 LM-SENSORS-MIB::lmFanSensorsIndex.8 = INTEGER: 7 LM-SENSORS-MIB::lmFanSensorsIndex.9 = INTEGER: 8 LM-SENSORS-MIB::lmFanSensorsIndex.10 = INTEGER: 9 LM-SENSORS-MIB::lmFanSensorsDevice.1 = STRING: CPU0_PFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.2 = STRING: CPU1_PFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.3 = STRING: CPU0_SFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.4 = STRING: CPU1_SFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.5 = STRING: IO_BRIDGE_PFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.6 = STRING: IO_BRIDGE_SFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.7 = STRING: IO0_PFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.8 = STRING: IO1_PFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.9 = STRING: IO0_SFAN_TACH LM-SENSORS-MIB::lmFanSensorsDevice.10 = STRING: IO1_SFAN_TACH LM-SENSORS-MIB::lmFanSensorsValue.1 = Gauge32: 2439 LM-SENSORS-MIB::lmFanSensorsValue.2 = Gauge32: 2586 LM-SENSORS-MIB::lmFanSensorsValue.3 = Gauge32: 2459 LM-SENSORS-MIB::lmFanSensorsValue.4 = Gauge32: 2564 LM-SENSORS-MIB::lmFanSensorsValue.5 = Gauge32: 3409 LM-SENSORS-MIB::lmFanSensorsValue.6 = Gauge32: 0 LM-SENSORS-MIB::lmFanSensorsValue.7 = Gauge32: 3947 LM-SENSORS-MIB::lmFanSensorsValue.8 = Gauge32: 3896 LM-SENSORS-MIB::lmFanSensorsValue.9 = Gauge32: 4000 LM-SENSORS-MIB::lmFanSensorsValue.10 = Gauge32: 3896 LM-SENSORS-MIB::lmVoltSensorsIndex.1 = INTEGER: 0 LM-SENSORS-MIB::lmVoltSensorsIndex.2 = INTEGER: 1 LM-SENSORS-MIB::lmVoltSensorsIndex.3 = INTEGER: 2 LM-SENSORS-MIB::lmVoltSensorsIndex.4 = INTEGER: 3 LM-SENSORS-MIB::lmVoltSensorsIndex.5 = INTEGER: 4 LM-SENSORS-MIB::lmVoltSensorsIndex.6 = INTEGER: 5 LM-SENSORS-MIB::lmVoltSensorsIndex.7 = INTEGER: 6 LM-SENSORS-MIB::lmVoltSensorsIndex.8 = INTEGER: 7 LM-SENSORS-MIB::lmVoltSensorsIndex.9 = INTEGER: 8 LM-SENSORS-MIB::lmVoltSensorsIndex.10 = INTEGER: 9 LM-SENSORS-MIB::lmVoltSensorsIndex.11 = INTEGER: 10 LM-SENSORS-MIB::lmVoltSensorsIndex.12 = INTEGER: 11 LM-SENSORS-MIB::lmVoltSensorsDevice.1 = STRING: PS0_3_3V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.2 = STRING: PS0_5V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.3 = STRING: PS0_12V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.4 = STRING: PS0_48V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.5 = STRING: PS1_3_3V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.6 = STRING: PS1_5V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.7 = STRING: PS1_12V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.8 = STRING: PS1_48V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.9 = STRING: PS2_3_3V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.10 = STRING: PS2_5V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.11 = STRING: PS2_12V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsDevice.12 = STRING: PS2_48V_I_SENSOR LM-SENSORS-MIB::lmVoltSensorsValue.1 = Gauge32: 6 LM-SENSORS-MIB::lmVoltSensorsValue.2 = Gauge32: 4 LM-SENSORS-MIB::lmVoltSensorsValue.3 = Gauge32: 3 LM-SENSORS-MIB::lmVoltSensorsValue.4 = Gauge32: 4 LM-SENSORS-MIB::lmVoltSensorsValue.5 = Gauge32: 6 LM-SENSORS-MIB::lmVoltSensorsValue.6 = Gauge32: 4 LM-SENSORS-MIB::lmVoltSensorsValue.7 = Gauge32: 3 LM-SENSORS-MIB::lmVoltSensorsValue.8 = Gauge32: 4 LM-SENSORS-MIB::lmVoltSensorsValue.9 = Gauge32: 6 LM-SENSORS-MIB::lmVoltSensorsValue.10 = Gauge32: 4 LM-SENSORS-MIB::lmVoltSensorsValue.11 = Gauge32: 3 LM-SENSORS-MIB::lmVoltSensorsValue.12 = Gauge32: 4 This component also reports information for switches, LEDs and i2c's (devices accessing the i2c bus). Because the MIB only allows us to display numeric information a certain amount of translation has been done. Switches: 0 = OFF 1 = ON 2 = NORMAL 3 = LOCKED 4 = UNKNOWN 5 = DIAG 6 = SECURE 99 = other LEDs: 0 = OFF 1 = ON 2 = BLINK (this may not exist) 99 = other i2c's: 0 = OK 99 = other In order to prevent inordinant consumption of machine resources, some sensor information is cached. Currently, information retrieved from picld is cached for six seconds. -- Bruce Shaw ------------------------------------------------------------ 10. MIB rewrites for IF-MIB, TCP-MIB and UDP-MIB net-snmp 5.4 has started to include rewrites for the IF-MIB, TCP-MIB and UDP-MIB implementations. They need to be explicitely enabled, though: ./configure --enable-mfd-rewrites ... See the Net-SNMP Wiki (http://www.net-snmp.org/wiki/index.php/IF-MIB_rewrite) for further details. Thanks to Sun for the excellent patches. -- Thomas Anders ------------------------------------------------------------ 11. Files descriptors and fopen Solaris has a limitation on the number of file descriptors (255) available in stdio, so that fopen() fails if more than 255 file descriptors (sockets) are open. This prevents mibs from being loaded after 250 sockets are open, since parse.c uses stdio. SEan investigated this problem, and had this report on using the SFIO package to solve this problem. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The SFIO package ( http://www.research.att.com/sw/tools/sfio/ ) is a buffered streams IO package that is much more more sophisticated than stdio, but it does support stdio API's for backward compatibility, and that's the aspect that is important here. To compile with SFIO, we simply add -I/usr/local/sfio/include to the $CPPFLAGS before compiling net-snmp. This causes SFIO's stdio.h to preempt Solaris stdio, mapping calls like fopen() and fprintf() to the SFIO implementations. This produces a libnetsnmp that does not have the fopen() limitation. Any application that links to this libnetsnmp must also be linked to libsfio. Here are the two caveats: A. libsfio exports the functions 'getc' and 'putc', for reasons that are not clear. These are the only symbols it exports that conflict with stdio. While getc and putc are traditionally macros, Solaris makes them functions in multithreaded code (compiled with -mt, -pthread, or -D_REENTRANT). If your native stdio code links to the libsfio versions, a crash will result. There are two solutions to this problem. You may remove getc and putc from libsfio, since SFIO defines getc and putc as macros, by doing: ar d libsfio.a getc.o ar d libsfio.a putc.o or link to SFIO's stdio compatibility library, libstdio, ahead of libsfio. This library wraps all of the native stdio calls with versions that are safe for native or sfio streams, in case you need to share streams between SFIO and native stdio codes. B. libsfio provides 64-bit offsets in fseek(), ftell(). This is a good thing, since SFIO is intended to avoid needless limitations, but it means that SFIO's stdio.h defines off_t to be a 64-bit offset. Net-SNMP uses readdir(), which returns a struct dirent containing a 32-bit off_t, so the code compiled for SFIO doesn't access struct dirent's correctly. There are two solutions to this problem, as well. The first is to include at the start of SFIO's stdio.h. Since SFIO defines a macro substitution for off_t, this leaves struct dirent's definition unchanged. An alternative, which I haven't verified, is to define _FILE_OFFSET_BITS to be 64 when compiling libnetsnmp. According to what I see in Solaris's /usr/include/sys/feature_tests.h, you can select a 64-bit off_t at compile time with this setting, which should make readdir()'s off_t compatible with SFIO's ftell(), fseek(). [[ We have received reports that this approach does not in fact work (see Perl discussion below)]] Finally, thanks to Phong Vo and AT&T Labs for a fast, robust and portable package that solves this headache very neatly. -SEan ------------------------------------------------------------ 12. Perl Net-SNMP may be compiled with Perl support by configuring like: ./configure -enable-embedded-perl ... This should only be done if you are sure you really need Perl, for the following reasons: Solaris 8 and later ship with a version of Perl compiled using Sun's cc. This causes a problem when attempting to compile net-snmp with Perl functionality ie.: ./configure --with-mib-modules="ucd-snmp/lmSensors ucd-snmp/diskio \ smux mibII/mta_sendmail" --enable-embedded-perl because during the Perl section of the compile, it attempts to do so using the methodology used to compile the original Perl, not what you're currently using. This can be discovered by typing: perl -V and it says (among other things) Compiler: cc='cc' and you don't have the full version of Sun's C compiler on your system, it's going to break. In addition if it was compiled with: LFS_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 net-snmp will not compile correctly. Given that the Perl provided with Solaris 8 (5.005_03) and Solaris 9 (5.005_03 and 5.6.1) is somewhat stale, upgrading may be to your advantage. Perl did not ship with Solaris before version 8. If you installed a version from www.sunfreeware.com, it is compiled with some extra flags that cause the net-snmp compile to break. In either case, you will need to compile and install Perl. There are, however, some issues. A. Some applications (eg. /usr/bin/kstat) require this exact version of Perl because of libraries. These instructions below install Perl in /usr/local/bin (and optionally /usr/bin/). The original is left intact in /usr/perl5/bin/perl where, in fact, the kstat script looks for it. If you have version specific scripts, you will need to do the same either by invoking /usr/perl5/bin/perl or putting: #!/usr/perl/bin/perl -w as the first line of your script and making it executable (see the /usr/bin/kstat source as an example). B. The instructions below disable large file support. This means that Perl would be unable to deal successfully with files larger than 2 Gb. Again, using /usr/perl5/bin/perl or a version compiled with this functionality would solve this. Hence the ideal solution is a net-snmp specific Perl in its own directory. The following instructions will install a working Perl in /usr/local/net-snmp. Install gcc version 3.3.2 (or later) from www.sunfreeware.com. Download the current stable release of Perl http://www.cpan.org/src/stable.tar.gz and gunzip and untar. (This document assumes Perl 5.8.3 or later) cd to the source directory and type the following: sh Configure -Dcc=gcc -Dprefix=/usr/local/net-snmp -Uinstallusrbinperl \ -Duseshrplib -Dcf_email=your_email@your_domain \ -Dperladmin=your_email@your_domain -Uuselargefiles -de Replace your_email@your_domain by your real email address. If you intend to compile Net-SNMP with Sun cc later on, replace gcc with cc above. When it is finished, do: grep cppsymbols config.sh and make sure "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" does NOT appear. Then do: make make test (optional) make install /usr/local/net-snmp/bin/perl -V if everything looks all right, compile net-snmp (see above) with the following differences: env PERLPROG=/usr/local/net-snmp/bin/perl ./configure --enable-embedded-perl \ --with-mib-modules=ucd-snmp/lmSensors,ucd-snmp/diskio,smux,mibII/mta_sendmail \ --with-cc=gcc && make && make test && make install Make sure you specify the correct path to your self-compiled Perl binary and use the same compiler like the one you used when building Perl above. Feel free to add other configure options, of course. "make test" includes some tests for the Net-SNMP Perl functionalities. Once you have compiled and installed net-snmp you can test the Perl capabilities of the final installation by doing the following: Copy the perl_module.pl script found at http://www.net-snmp.org/tutorial-5/toolkit/perl/index.html to /usr/local/net-snmp and modify your /usr/local/share/snmp/snmpd.conf file to contain the entry: perl do "/usr/local/net-snmp/perl_module.pl"; then do: /usr/local/bin/snmpwalk -v 2c -c whatever localhost .1.3.6.1.4.1.8072.999 It should return the following: NET-SNMP-MIB::netSnmp.999.1.2.1 = STRING: "hello world" WARNING!! If you are planning on creating binary versions of net-snmp with Perl capability, you will also need to ship the Perl which you created in /usr/local/net-snmp. -- Bruce Shaw -- Thomas Anders ------------------------------------------------------------ 13. sed Various sed versions in older Solaris releases (Solaris 8 and earlier at least) have serious limitations that may affect ./configure when building net-snmp. All these issues *should* have been addressed in net-snmp 5.4 and later. If you still have problems, please let us know and consider: - installing GNU sed and putting it in front of your PATH - installing the available Sun patches for the various sed versions (/usr/bin/sed, /usr/xpg4/bin/sed, /usr/ucb/sed) - try the suggestions below The version of sed in /usr/ucb on Solaris 2.5.1 and 2.6 can't cope with the size of the substitution strings used in config.status. Putting /usr/bin ahead of /usr/ucb in the search path fixes this. /usr/xpg4/bin/sed is seen to segfault under Solaris 8 when running configure. Putting /usr/bin ahead of /usr/xpg4/bin fixes this. -- Thomas Anders -- zach dot metzinger at microtune dot com ------------------------------------------------------------ 14. OpenSSL and crle If compiling with OpenSSL (e.g. from sunsolve), it's possible that the agent won't successfully load the crypto library (typically in /usr/local/ssl/lib) when it is in use and will return a cannot find library error message of some sort. To rectify this, you will need to use the /usr/bin/crle command, which did NOT ship with some versions of Solaris, but came as part of later patches. You should make sure the following patches are up to date: 107733 (Solaris 2.6) 106950 (Solaris 2.7) 109147 (Solaris 8) 115833 (Trusted Solaris 8) 112693 (Solaris 9) Then type the following: /usr/bin/crle It will return something like: Default configuration file (/var/ld/ld.config) not found Default Library Path (ELF): /usr/lib (system default) Trusted Directories (ELF): /usr/lib/secure (system default) Find the location of the libcrypto libraries by typing: find /usr -name "libcrypto*" -print which will probably display: /usr/local/ssl/lib/libcrypto.a /usr/local/ssl/lib/libcrypto.so /usr/local/ssl/lib/libcrypto.so.0 /usr/local/ssl/lib/libcrypto.so.0.9.7 which is the default installation for OpenSSL. To include this in the loader search path, type: /usr/bin/crle -u -l /usr/local/ssl/lib /usr/bin/crle will now display: Configuration file [3]: /var/ld/ld.config Default Library Path (ELF): /usr/lib:/usr/local/ssl/lib Trusted Directories (ELF): /usr/lib/secure (system default) Command line: crle -c /var/ld/ld.config -l /usr/lib:/usr/local/ssl/lib If this fails, usually by displaying: crle: /var/ld/ld.config: open failed: No such file or directory you will need to create this directory by hand by doing the following: mkdir /var/ld cd /var/ld ln -s . 32 mkdir sparcv9 chgrp bin sparcv9 ln -s sparcv9 64 touch ld.config then do: crle -c /var/ld/ld.config -l /usr/lib:/usr/local/ssl/lib Thanks to Dave Shield and Johannes Schmidt-Fischer -- Bruce Shaw ------------------------------------------------------------ 15. IPv6 Starting with net-snmp 5.4 you can enable the UDPIPv6 and TCPIPv6 transports on Solaris: ./configure --enable-ipv6 There's no support for the mibII/ipv6 mib module, though. -- Thomas Anders ------------------------------------------------------------ 16. Wish list A. Code cleanup There may be opportunities for shared code between UCD-SNMP and HOST-RESOURCES-MIB. There may be opportunities to optimize caching perhaps using the new auto-caching code. B. LM-SENSORS-MIB We need a complete list of sensors from various platforms so they can be displayed properly. C. ORACLE How to get ORACLE's SNMP functionality to work as a sub-agent. D. Largefile support Rework the host mib module to work even if net-snmp is built with largefile support. This would eliminate the most important problems with Perl (see section 12). -- Bruce Shaw -- Thomas Anders ------------------------------------------------------------ 17. Known Bugs!! A. hrDeviceTable (HOST-RESOURCES-MIB) This section of code is only aware of disk controllers 0 through 7. Hence, anything on controller c8 and above will be invisible. B. hrPartitionTable (HOST-RESOURCES-MIB) At present, hrPartitionSize data only works for regular ufs partitions eg. /dev/dsk/c0t0d0s0 that are mounted. They are displayed in partition order rather than the order they are mounted. Partitions mounted as mirrors, metastate database replicas, swap or members of a RAID display size 0. As a workaround, put entries for disks you are interested in in snmpd.conf and examine using UCD-SNMP-MIB. -- Bruce Shaw ------------------------------------------------------------ 18. Discussion and further information For discussion or further information contact the coders and users lists at http://sourceforge.net/mail/?group_id=12694 . ======================================================================== * perl/OID/README ======================================================================== OID version 0.01 ================ The NetSNMP::OID class is a simple wrapper around a C-based net-snmp oid. The OID is internally stored as a C array of integers for speed purposes when doing comparisons, etc. The standard logical expression operators (<, >, ==, ...) are overloaded such that lexographical comparisons may be done with them. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: The net-snmp 5.0 or greater release The SNMP 5.0.1 or greater perl module. COPYRIGHT AND LICENCE Copyright (c) 2002 Networks Associates Technology, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ======================================================================== * perl/SNMP/README ======================================================================== The Perl5 'SNMP' Extension Module for the Net-SNMP Library Contents: Introduction: Availability: Contact: Supported Platforms: Release Notes: Installation: Operational Description: Trouble Shooting: Acknowledgments: History: Copyright: Introduction: ******************************NOTE NOTE NOTE************************** This module now relies on many other modules. Ideally, do not try to build it independently, as it won't work as well. Instead of running "perl Makefile.PL" in this directory, run it in the net-snmp/perl directory instead which has a global makefile used to build all the sub-modules in their proper order. ******************************NOTE NOTE NOTE************************** Note: The perl SNMP 5.x module which comes with net-snmp 5.0 and higher is different than previous versions in a number of ways. Most importantly, it behaves like a proper net-snmp application and calls init_snmp properly, which means it will read configuration files and use those defaults where appropriate automatically parse MIB files, etc. This will likely affect your perl applications if you have, for instance, default values set up in your snmp.conf file (as the perl module will now make use of those defaults). The docmuentation, however, has sadly not been updated yet (aside from this note). This is the Perl5 'SNMP' extension module. The SNMP module provides a full featured, tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) API. The SNMP module also provides an interface to the SMI MIB parse-tree for run-time access to parsed MIB data. The SNMP module internals rely on the Net-SNMP toolkit library (previously known as ucd-snmp). For information on the Net-SNMP library see the documentation provided with the Net-SNMP distribution or the project web page available on 'Source Forge': http://www.net-snmp.org/ Availability: The most recent release of the Perl5 SNMP module can be found bundled with the latest Net-SNMP distibution available from: http://www.net-snmp.org/download.html (Note: The perl SNMP distribution obtained this way has the highest chance of being up to date and compatible with the Net-SNMP version with which it is bundled.) A seperately bundled package of the SNMP module can be obtained from CPAN. (Note: In previous releases this module was compatible with the CMU SNMP library. Starting with Perl5/SNMP-1.7 this module will *only* work with the Net-SNMP (aka ucd-snmp) library due to dependence on new features) Contact: The following mailing list should be consider the primary support mechanism for this module: net-snmp-users ATATAT lists.sourceforge.net mail list (see http://www.net-snmp.org/lists/users/ to subscribe) Supported Platforms: Linux 1.2.x, 2.x Solaris 2.x (see the net-snmp README.solaris file!) MS Windows Many other UNIX variants Let us know what it *doesn't* work on, as it should on most systems Release Notes: SNMP module version 5.x is being developed against NET-SNMP-5.0 see http://www.net-snmp.org/ for details. Compatibility with earlier or later versions of Net-SNMP or UCD-SNMP is not guaranteed due to the dynamic nature of open software development :). The perl module will check the version of net-snmp you have installed for a match and warn you if they don't match exactly. KNOWN BUGS: The make test suite likely won't work perfectly. It relies on running an existing Net-SNMP SNMP agent and various configuration which makes it very hard to ensure exact compatibility. If "make test" fails on you we suggest you install the module anyway. (none?) (HA!) ********************************************************************** * the rest of this file is likely out of date ************************ * the rest of this file is likely out of date ************************ * the rest of this file is likely out of date ************************ ********************************************************************** Installation: Build and install the Net-SNMP package - see Net-SNMP README and INSTALL docs. (Note: To ensure that any previous Net-SNMP, ucd-snmp or cmu snmp installation's library or headers are not used by mistake, use the -NET-SNMP-CONFIG directive to explicitly set the path to the net-snmp-config command that knows about the net-snmp installation you want to use.) NOTE: build all the perl modules at once using the Makefile.PL in the net-snmp/perl directory rather than the one in this directory. Unix: cd net-snmp/perl perl Makefile.PL [-NET-SNMP-CONFIG="sh ../../net-snmp-config"] [-NET-SNMP-IN-SOURCE=true] make make test make install FreeBSD: cd net-snmp/perl perl Makefile.PL -NET-SNMP-CONFIG="sh ../../net-snmp-config" -NET-SNMP-IN-SOURCE=true make make test make install Win32 (MSVC++) This section covers installation of the Perl modules for Microsoft Visual C++ 6.0 and Microsoft Microsoft Development Environment 2003/2003 (MSVC 7.0/7.1). See the following sections for Cygwin and MinGW. ActiveState Perl is required. Note: With ActiveState Perl (currently at 5.8.2 build 808) and possibly other versions of Perl on Windows, if a Perl script modifies a system environment variable and then calls a C function, the C function will not see the new environment variable. This problem can be seen with the failure of test #3 in the SNMP conf test (perl/SNMP/t/conf.t). The change to the SNMPCONFPATH env variable is not seen by the calls to the C SNMP module. Note: The source code should *not* be in a folder that contains a space. For example, compiling in your 'My Documents' or your Desktop (usually c:\Documents and Settings\xxxx\Desktop) is not supported. Automatic building / testing with nmakeperl.bat: 1. Ensure a static version of Net-SNMP has been compiled and installed. Also ensure the DLL version of snmplib has been compiled and installed. The Perl modules will not function correctly without a shared snmplib library or DLL. 2. Install the regex win32 package (gnu_regex.exe). It is available from http://people.delphiforums.com/gjc/gnu_regex.html a. Copy regex.h to the include folder of MSVC++ Example: "C:\Program Files\Microsoft Visual Studio .NET 2003\ Vc7\include\regex.h" b. Copy gnu_regex.lib to the lib folder of MSVC++ Example: "C:\Program Files\Microsoft Visual Studio .NET 2003\ Vc7\lib\gnu_regex.lib" c. Copy gnu_regex.dll to your %windir%\system32 folder Example: "C:\winnt\system32\gnu_regex.dll" 3. Set the environment PATH to locate "nmake", "cl", and "link". Visual Studio installs a VCVARS32.BAT batch file for this purpose. 4. Using a command prompt window, cd to the source base directory. 5. Invoke win32\nmakeperl.bat to build the Perl SNMP modules. If you see errors, review the "nmake.out" file first. If no errors there, then the modules built correctly, but the tests did not rigourously prove the mettle of the modules. Review "nmaketest.out". If the first three sections mostly pass, the modules are well formed. NOTE: If the tests fail, there may be a perl application left hanging. Use the Task Manager to remove any stale perl or snmp*.exe process. 6. The final step is to invoke "nmake install". If no errors occurred, then the SNMP modules are available for use by your Perl programs. Manual building / testing: 1. Ensure a static version of Net-SNMP has been compiled and installed. Also ensure the DLL version of snmplib has been compiled and installed. The Perl modules will not function correctly without a shared snmplib library or DLL. 2. Install the regex win32 package (gnu_regex.exe). It is available from http://people.delphiforums.com/gjc/gnu_regex.html a. Copy regex.h to the include folder of MSVC++ Example: "C:\Program Files\Microsoft Visual Studio .NET 2003\ Vc7\include\regex.h" b. Copy gnu_regex.lib to the lib folder of MSVC++ Example: "C:\Program Files\Microsoft Visual Studio .NET 2003\ Vc7\lib\gnu_regex.lib" c. Copy gnu_regex.dll to your %windir%\system32 folder Example: "C:\winnt\system32\gnu_regex.dll" 3. Set the environment PATH to locate "nmake", "cl", and "link". Visual Studio installs a VCVARS32.BAT for this purpose. 4. Using a command prompt window, cd to the perl directory. 5. Type: perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE to compile against the RELEASE version of Net-SNMP, or: perl Makefile.PL CAPI=TRUE -NET-SNMP-IN-SOURCE=TRUE -NET-SNMP-DEBUG=TRUE to compile against the DEBUG version of Net-SNMP. nmake nmake test nmake install Note: The --NET-SNMP-IN-SOURCE=TRUE causes the Makefile to use the library files from the installed Net-SNMP directory. To specify the installed Net-SNMP directory, use: perl Makefile.PL CAPI=TRUE -NET-SNMP-PATH="c:\usr" Note: -NET-SNMP-DEBUG has no effect while compiling against an installed copy of Net-SNMP. Note: To include OpenSSL, see the net-snmp/README.win32 to compile libsnmp with libeay32 and see that libeay.lib is in the lib folder, or in the lib folder of the installed Net-SNMP if using -NET-SNMP-PATH. For example, c:\usr\lib Note: 'nmake test' will automatically start and stop the agent(snmpd) and trap receiver (snmptrapd) while testing the SNMP module. Win32 (Cygwin): cd net-snmp\perl perl Makefile.PL -NET-SNMP-IN-SOURCE=true make make test make install If you get an error saying your system can't compile, you are probably missing the regex library. Install regex from http://mirrors.sunsite.dk/cygwin/release/regex/regex-4.4-2-src.tar.bz2 Note: The source code should *not* be in a folder that contains a space. For example, compiling in your 'My Documents' or your Desktop (usually c:\Documents and Settings\xxxx\Desktop) is not supported. Win32 (MinGW): Note: As of February 25th, 2004, the MinGW build of Net-SNMP does not compile the DLL version of libsnmp. Some modules will not function correctly without a shared library / DLL. The OID module does not appear to work at all without the DLL, and some parts of other modules may not work. For example, sharing configurations between modules which is why the SNMP conf test fails. Note: The source code should *not* be in a folder that contains a space. For example, compiling in your 'My Documents' or your Desktop (usually c:\Documents and Settings\xxxx\Desktop) is not supported. These directions are for MinGW 3.1.0 with MSYS 1.0.9 and ActiveState Perl. Compiling the Perl modules using a MinGW built Perl environment has not been tested. Note: With ActiveState Perl (currently at 5.8.2 build 808) and possibly other versions of Perl on Windows, if a Perl script modifies a system environment variable and then calls a C function, the C function will not see the new environment variable. This problem can be seen with the failure of test #3 in the SNMP conf test (perl/SNMP/t/conf.t). The change to the SNMPCONFPATH env variable is not seen by the calls to the C SNMP module. The main Net-SNMP package must be compiled with the regex library. See Net-SNMP README.win32 for compiling with MinGW. The following additional software is required: dmake: http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip ExtUtils-FakeConfig: http://search.cpan.org/~mbarbon/ExtUtils-FakeConfig-0.05/ Note: A PPM package is available from ActiveState for ExtUtils-FakeConfig, but it does not include the make_implib.pl script. Downloading from CPAN is recommended. Installing DMAKE and ExtUtils-FakeConfig: ----------------------------------------- 1. Install DMAKE as described in the README.NOW contained in the DMAKE .ZIP file ensuring the DMAKE program can be found in the system path. 2. Extract ExtUtils-FakeConfig-0.05.zip to a temporary folder. 3. Add the MinGW bin folder to your system path. 4. Open a Windows command prompt (cmd) and cd into ExtUtils-FakeConfig-0.05 and typet he following to build and install the ExtUtils-FakeConfig module: perl Makefile.PL dmake dmake install 5. A Perl import library needs to be created using the ExtUtils-FakeConfig make_implib.pl script. For ActiveState Perl 5.6.x installed to c:\Perl, type the following on one line: perl script/make_implib.pl --output-dir=C:/Perl/lib/CORE --output-lib=libperl56.a --target=mingw c:/Perl/bin/Perl56.dll For ActiveState Perl 5.8.x installed to c:\Perl, type the following on one line: perl script/make_implib.pl --output-dir=C:/Perl/lib/CORE --output-lib=libperl58.a --target=mingw c:/Perl/bin/Perl58.dll Building the Perl module: ------------------------- 1. Complete the section titled 'Installing DMAKE and ExtUtils-FakeConfig' 2. Open an MSYS shell and cd into the net-snmp/Perl folder and type the following on one line: perl -MConfig_m Makefile.PL -NET-SNMP-IN-SOURCE=true DEFINE=-DMINGW_PERL 3. Open a Windows command prompt (cmd) and cd into the net-snmp/perl folder and type: dmake dmake test dmake install Note: 'dmake test' will automatically start and stop the agent(snmpd) and trap receiver (snmptrapd) while testing the SNMP module. 4. Remove the MinGW bin folder to your system path if it was not already in your path for step 3 of 'Installing DMAKE and ExtUtils-FakeConfig'. Operational Description: The basic operations of the SNMP protocol are provided by this module through an object oriented interface for modularity and ease of use. The primary class is SNMP::Session which encapsulates the persistent aspects of a connection between the management application and the managed agent. Internally the class is implemented as a blessed hash reference. This class supplies 'get', 'getnext', 'set', 'fget', and 'fgetnext' and other method calls. The methods take a variety of input argument formats and support both synchronous and asynchronous operation through a polymorphic API (i.e., method behaviour varies dependent on args passed - see below). A description of the fields which can be specified when an SNMP::Session object is created follows: SNMP::Session public: DestHost - default 'localhost', hostname or ip addr of SNMP agent Community - default 'public', SNMP community string (used for both R/W) Version - default '1', [2 (same as 2c), 2c, 3] RemotePort - default '161', allow remote UDP port to be overridden Timeout - default '1000000', micro-seconds before retry Retries - default '5', retries before failure RetryNoSuch - default '0', if enabled NOSUCH errors in 'get' pdus will be repaired, removing the varbind in error, and resent - undef will be returned for all NOSUCH varbinds, when set to '0' this feature is disabled and the entire get request will fail on any NOSUCH error (applies to v1 only) SecName - default 'initial', security name (v3) SecLevel - default 'noAuthNoPriv', security level [noAuthNoPriv, authNoPriv, authPriv] (v3) SecEngineId - default , security engineID, will be probed if not supplied (v3) ContextEngineId - default , context engineID, will be probed if not supplied (v3) Context - default '', context name (v3) AuthProto - default 'MD5', authentication protocol [MD5, SHA] (v3) AuthPass - default , authentication passphrase PrivProto - default 'DES', privacy protocol [DES] (v3) PrivPass - default , privacy passphrase (v3) VarFormats - default 'undef', used by 'fget[next]', holds an hash reference of output value formatters, (e.g., { => , ... }, must match the and format used in the get operation. A special , '*', may be used to apply all s, the supplied sub is called to translate the value to a new format. The sub is called passing the Varbind as the arg TypeFormats - default 'undef', used by 'fget[next]', holds an hash reference of output value formatters, (e.g., { => , ... }, the supplied sub is called to translate the value to a new format, unless a VarFormat mathces first (e.g., $session->{TypeFormats}{INTEGER} = \&mapEnum(); although this can be done more efficiently by enabling $SNMP::use_enums or session creation param 'UseEnums') UseLongNames - defaults to the value of SNMP::use_long_names at time of session creation. set to non-zero to have for 'getnext' methods generated preferring longer Mib name convention (e.g., system.sysDescr vs just sysDescr) UseSprintValue - defaults to the value of SNMP::use_sprint_value at time of session creation. set to non-zero to have return values for 'get' and 'getnext' methods formatted with the libraries sprint_value function. This will result in certain data types being returned in non-canonical format Note: values returned with this option set may not be appropriate for 'set' operations (see discussion of value formats in description section) UseEnums - defaults to the value of SNMP::use_enums at time of session creation. set to non-zero to have integer return values converted to enumeration identifiers if possible, these values will also be acceptable when supplied to 'set' operations UseNumeric - defaults to the value of SNMP::use_numeric at time of session creation. set to non-zero to have returned by the 'get' methods untranslated (i.e. dotted-decimal). Setting the UseLongNames value for the session is highly recommended. BestGuess - defaults to the value of SNMP::best_guess at time of session creation. this setting controls how are parsed. setting to 0 causes a regular lookup. setting to 1 causes a regular expression match (defined as -Ib in snmpcmd) and setting to 2 causes a random access lookup (defined as -IR in snmpcmd). ErrorStr - read-only, holds the error message assoc. w/ last request ErrorNum - read-only, holds the snmp_err or status of last request ErrorInd - read-only, holds the snmp_err_index when appropriate private: DestAddr - internal field used to hold the translated DestHost field SessPtr - internal field used to cache a created session structure methods: new() - Constructs a new SNMP::Session object. The fields are passed to the constructor as a hash list (e.g., $session = new SNMP::Session(DestHost => 'foo', Community => 'private');), returns an object reference or undef in case of error. update()- Updates the SNMP::Session object with the values fields passed in as a hash list (similar to new()) (WARNING! not fully implemented) get([,]) - do SNMP GET, multiple formats accepted. for synchronous operation will be updated with value(s) and type(s) and will also return retrieved value(s). If supplied method will operate asynchronously fget([,]) - do SNMP GET like 'get' and format the values according the handlers specified in $sess->{VarFormats} and $sess->{TypeFormats}. Async *not supported* getnext([,]) - do SNMP GETNEXT, multiple formats accepted, returns retrieved value(s), passed as arguments are updated to indicate next lexicographical ,,, and Note: simple string ,(e.g., 'sysDescr.0') form is not updated. If supplied method will operate asynchronously fgetnext([,]) - do SNMP GETNEXT like getnext and format the values according the handlers specified in $sess->{VarFormats} and $sess->{TypeFormats}. Async *not supported* set([,]) - do SNMP SET, multiple formats accepted. the value field in all formats must be in a canonical format (i.e., well known format) to ensure unambiguous translation to SNMP MIB data value (see discussion of canonical value format description section), returns true on success or undef on error. If supplied method will operate asynchronously getbulk(, , [, ]) - do an SNMP GETBULK, from the list of Varbinds, the single next lexico instance is fetched for the first n Varbinds as defined by . For remaining Varbinds, the m lexico instances are retrieved each of the remaining Varbinds, where m is . bulkwalk(, , [, ]) - do an "SNMP bulkwalk" on the given variables. Bulkwalk is implemented by sending an SNMP GETBULK request to fetch the variables. Objects are copied to the return list until the sub-tree is exited. If the request is not completed at the end of a packet, a new request is created, starting where the previous packet left off. This implementation is able to handle multiple repeated vars, as well as non-repeaters. Returns a list (or, in scalar context, a reference to a list) of arrays of VarBinds. The VarBinds consist of the responses for each requested variable. bulkwalk() leaves the original Varbinds list intact to facilitate querying of multiple devices. SNMP::TrapSession - supports all applicable fields from SNMP::Session (see above) methods: new() - Constructs a new SNMP::TrapSession object. The fields are passed to the constructor as a hash list (e.g., $trapsess = new SNMP::Session(DestHost => 'foo', Community => 'private');), returns an object reference or undef in case of error. trap(enterprise, agent, generic, specific, uptime, ) $sess->trap(enterprise=>'.1.3.6.1.4.1.2021', # or 'ucdavis' [default] agent => '127.0.0.1', # or 'localhost',[dflt 1st intf on host] generic => specific, # can be omitted if 'specific' supplied specific => 5, # can be omitted if 'generic' supplied uptime => 1234, # dflt to localhost uptime (0 on win32) [[ifIndex, 1, 1],[sysLocation, 0, "here"]]); # optional vars # always last or v2 format trap(oid, uptime, ) $sess->trap(oid => 'snmpRisingAlarm', uptime => 1234, [[ifIndex, 1, 1],[sysLocation, 0, "here"]]); # optional vars # always last Acceptable variable formats: may be one of the following forms: SNMP::VarList: - represents an array of MIB objects to get or set, implemented as a blessed reference to an array of SNMP::Varbinds, (e.g., [, , ...]) SNMP::Varbind: - represents a single MIB object to get or set, implemented as a blessed reference to a 4 element array; [, , , ]. - one of the following forms: 1) leaf identifier (e.g., 'sysDescr') assumed to be unique for practical purposes 2) fully qualified identifier (e.g., '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr') 3) fully qualified, dotted-decimal, numeric OID (e.g., '.1.3.6.1.2.1.1.1') - the dotted-decimal, instance identifier. for scalar MIB objects use '0' - the SNMP data value retrieved from or being set to the agents MIB. for (f)get(next) operations may have a variety of formats as determined by session and package settings. However for set operations the format must be canonical to ensure unambiguous translation. The canonical forms are as follows: OBJECTID => dotted-decimal (e.g., .1.3.6.1.2.1.1.1) OCTETSTR => perl scalar containing octets, INTEGER => decimal signed integer (or enum), NETADDR => dotted-decimal, IPADDR => dotted-decimal, COUNTER => decimal unsigned integer, COUNTER64 => decimal unsigned integer, GAUGE, => decimal unsigned integer, UINTEGER, => decimal unsigned integer, TICKS, => decimal unsigned integer, OPAQUE => perl scalar containing octets, NULL, => perl scalar containing nothing, - SNMP data type (see list above), this field is populated by 'get' and 'getnext' operations. In some cases the programmer needs to populate this field when passing to a 'set' operation. this field need not be supplied when the attribute indicated by is already described by loaded Mib modules. for 'set's, if a numeric OID is used and the object is not currently in the loaded Mib, the field must be supplied simple string - light weight form of used to 'set' or 'get' a single attribute without constructing an SNMP::Varbind. stored in a perl scalar, has the form '.', (e.g., 'sysDescr.0'). for 'set' operations the value is passed as a second arg. Note: This argument form is not updated in get[next] operations as are the other forms. Acceptable callback formats: may be one of the following forms: without arguments: \&subname sub { ... } or with arguments: [ \&subname, $arg1, ... ] [ sub { ... }, $arg1, ... ] [ "method", $obj, $arg1, ... ] callback will be called when response is received or timeout occurs. the last argument passed to callback will be a SNMP::VarList reference. In case of timeout the last argument will be undef. SNMP package variables and functions: $SNMP::VERSION - the current version specifier (e.g., 3.1.0) $SNMP::auto_init_mib - default '1', set to 0 to disable automatic reading of the MIB upon session creation. set to non-zero to call initMib at session creation which will result in MIB loading according to Net-SNMP env. variables (see man mib_api) $SNMP::verbose - default '0', controls warning/info output of SNMP module, 0 => no output, 1 => enables warning/info output from SNMP module itself (is also controlled by SNMP::debugging - see below) $SNMP::use_long_names - default '0', set to non-zero to enable the use of longer Mib identifiers. see translateObj. will also influence the formatting of in varbinds returned from 'getnext' operations. Can be set on a per session basis (UseLongNames) $SNMP::use_sprint_value - default '0', set to non-zero to enable formatting of response values using the snmp libraries sprint_value function. can also be set on a per session basis (see UseSprintValue) Note: returned values may not be suitable for 'set' operations $SNMP::use_enums - default '0',set non-zero to return values as enums and allow sets using enums where appropriate. integer data will still be accepted for set operations. can also be set on a per session basis (see UseEnums) $SNMP::use_numeric - default '0', set to non-zero to return tags as numeric OID's, instead of translating them. Also setting $SNMP::use_long_names to non-zero is highly recommended. $SNMP::best_guess - default '0'. this setting controls how are parsed. setting to 0 causes a regular lookup. setting to 1 causes a regular expression match (defined as -Ib in snmpcmd) and setting to 2 causes a random access lookup (defined as -IR in snmpcmd). can also be set on a per session basis (see BestGuess) $SNMP::save_descriptions - default '0',set non-zero to have mib parser save attribute descriptions. must be set prior to mib initialization $SNMP::debugging - default '0', controls debugging output level within SNMP module and libsnmp 1 => enables 'SNMP::verbose' (see above) 2 => level 1 plus snmp_set_do_debugging(1), 3 => level 2 plus snmp_set_dump_packet(1) $SNMP::dump_packet - default '0', set [non-]zero to independently set snmp_set_dump_packet() %SNMP::MIB - a tied hash to access parsed MIB information. After the MIB has been loaded this hash allows access to to the parsed in MIB meta-data(the structure of the MIB (i.e., schema)). The hash returns blessed references to SNMP::MIB::NODE objects which represent a single MIB attribute. The nodes can be fetched with multiple 'key' formats - the leaf name (e.g.,sysDescr) or fully/partially qualified name (e.g., system.sysDescr) or fully qualified numeric OID. The returned node object supports the following fields: objectID - dotted decimal fully qualified OID label - leaf textual identifier (e.g., 'sysDescr') subID - leaf numeric OID component of objectID (e.g., '1') moduleID - textual identifier for module (e.g., 'RFC1213-MIB') parent - parent node children - array reference of children nodes nextNode - next lexico node (BUG!does not return in lexico order) type - returns application type (see getType for values) access - returns ACCESS (ReadOnly, ReadWrite, WriteOnly, NoAccess, Notify, Create) status - returns STATUS (Mandatory, Optional, Obsolete, Deprecated, Current) syntax - returns 'textualConvention' if defined else 'type' textualConvention - returns TEXTUAL-CONVENTION units - returns UNITS hint - returns HINT enums - returns hash ref {tag => num, ...} ranges - returns array ref of hash ref [{low=>num, high=>num}] defaultValue - returns default value description - returns DESCRIPTION ($SNMP::save_descriptions must be set prior to MIB initialization/parsing) &SNMP::setMib() - allows dynamic parsing of the mib and explicit specification of mib file independent of environment variables. called with no args acts like initMib, loading MIBs indicated by environment variables (see Net-SNMP mib_api docs). passing non-zero second arg forces previous mib to be freed and replaced (Note: second arg not working since freeing previous Mib is more involved than before). &SNMP::initMib() - calls library netsnmp_init_mib function if MIB not already loaded - does nothing if MIB already loaded. Will parse directories and load modules according to environment variables described in Net-SNMP documentations. (see man mib_api, MIBDIRS, MIBS, MIBFILE(S), etc.) &SNMP::addMibDirs(,...) - calls library add_mibdir for each directory supplied. will cause directory(s) to be added to internal list and made available for searching in subsequent loadModules calls &SNMP::addMibFiles(,...) - calls library read_mib function. The file(s) supplied will be read and all Mib module definitions contained therein will be added to internal mib tree structure &SNMP::loadModules(,...) - calls library read_module function. The module(s) supplied will be searched for in the current mibdirs and and added to internal mib tree structure. Passing special , 'ALL', will cause all known modules to be loaded. &SNMP::unloadModules(,...) - *Not Implemented* &SNMP::translateObj([,arg,[arg]]) - will convert a text obj tag to an OID and vice-versa. Any iid suffix is retained numerically. Default behaviour when converting a numeric OID to text form is to return leaf identifier only (e.g.,'sysDescr') but when $SNMP::use_long_names is non-zero or a non-zero second arg is supplied it will return a longer textual identifier. An optional third argument of non-zero will cause the module name to be prepended to the text name (e.g. 'SNMPv2-MIB::sysDescr'). When converting a text obj, the $SNMP::best_guess option is used. If no Mib is loaded when called and $SNMP::auto_init_mib is enabled then the Mib will be loaded. Will return 'undef' upon failure. &SNMP::getType() - return SNMP data type for given textual identifier OBJECTID, OCTETSTR, INTEGER, NETADDR, IPADDR, COUNTER GAUGE, TIMETICKS, OPAQUE, or undef &SNMP::mapEnum() - converts integer value to enumeration tag defined in Mib or converts tag to integer depending on input. the function will return the corresponding integer value *or* tag for a given MIB attribute and value. The function will sense which direction to perform the conversion. Various arg formats are supported $val = SNMP::mapEnum($varbind); # where $varbind is SNMP::Varbind or equiv # note: $varbind will be updated $val = SNMP::mapEnum('ipForwarding', 'forwarding'); $val = SNMP::mapEnum('ipForwarding', 1); &SNMP::MainLoop([, []]) - to be used with async SNMP::Session calls. MainLoop must be called after initial async calls so return packets from the agent will not be processed. If no args supplied this function enters an infinite loop so program must be exited in a callback or externally interrupted. If =, ... ) DestHost - default 'localhost', hostname or ip addr of SNMP agent Version - default '3', [1, 2 (equiv to 2c), 3] RemotePort - default '161', allow remote UDP port to be overridden Timeout - default '500000', micro-seconds before retry Retries - default '3', retries before failure RetryNoSuch - default '0', if enabled NOSUCH errors in 'get' pdus will be repaired, removing the varbind in error, and resent - undef will be returned for all NOSUCH varbinds, when set to '0' this feature is disabled and the entire get request will fail on any NOSUCH error (applies to v1 only) UseLongNames - set to non-zero to have for 'getnext' methods generated preferring longer Mib name convention (e.g., system.sysDescr vs just sysDescr) UseSprintValue - set to non-zero to have return values for 'get' and 'getnext' methods formatted with the libraries sprint_value function. This will result in certain data types being returned in non-canonical format Note: values returned with this option set may not be appropriate for 'set' operations (see discussion of value formats in description section) UseEnums - set to non-zero to have integer return values converted to enumeration identifiers if possible, these values will also be acceptable when supplied to 'set' operations UseNumeric - set to non-zero to have returned by the 'get' methods untranslated (i.e. dotted-decimal). Setting the UseLongNames value for the session is highly recommended. BestGuess - this setting controls how are parsed. setting to 0 causes a regular lookup. setting to 1 causes a regular expression match (defined as -Ib in snmpcmd). setting to 2 causes a random access lookup (defined as -IR in snmpcmd). ErrorStr - read-only, holds the error message assoc. w/ last request ErrorNum - read-only, holds the snmp_err or status of last request ErrorInd - read-only, holds the snmp_err_index when appropriate SNMPv1/SNMPv2c options: Community - default 'public', SNMP community string (used for both R/W) SNMPv3 Options: SecName - default 'initial', security name (v3) SecLevel - default 'noAuthNoPriv', security level [noAuthNoPriv, authNoPriv, authPriv] (v3) ContextEngineId - default , context engineID, will be probed if not supplied (v3) Context - default '', context name (v3) SNMPv3 over TLS or DTLS options: OurIdentity - The fingerprint or file name for the local X.509 certificate to use for our identity. Run net-snmp-cert to create and manage certificates. TheirIdentity - The fingerprint or file name for the local X.509 certificate to use for their identity. TrustCert - A trusted certificate to use for validating certificates. Typically this would be a CA certificate. TheirHostname - Their hostname to expect. Either "TheirIdentity" or a trusted certificate plus a hostname is needed to validate the server is the proper server. SNMPv3 with USM security Options: SecEngineId - default , security engineID, will be probed if not supplied (v3) AuthProto - default 'MD5', authentication protocol [MD5, SHA] (v3) AuthPass - default , authentication passphrase PrivProto - default 'DES', privacy protocol [DES] (v3) PrivPass - default , privacy passphrase (v3) private: sess_ptr - internal field used to cache a created session structure methods: get() - SNMP GET a netsnmp.VarList object must be supplied, returns a tuple of values for each varbind in list getnext() - SNMP GETNEXT, a netsnmp.VarList object must be supplied returns retrieved value(s), VarList passed as arguments are updated to return a list of next lexicographical Varbind objects. returns a tuple of values for each varbind in list set() - SNMP SET, a netsnmp.VarList object must be supplied the value field in all Varbinds must be in a canonical format (i.e., well known format) to ensure unambiguous translation to SNMP MIB data value (see discussion of canonical value format description section), returns true on success or None on error. getbulk(, , ) - SNMP GETBULK, a netsnmp.VarList object must be supplied the single next lexico instance is fetched for the first n Varbinds in the list as defined by . For the remaining Varbinds, the next m lexico instances are retrieved each of the remaining Varbinds, where m is . Returns a tuple of values retrieved. walk() - Performs multiple GETNEXT requests in order to return a tuple of values retrieved from the MIB below the Varbind passed in. The VarList passed in will be updated to contain a complete set of Varbinds created for the results of the walk. Note that only one varbind should be contained in the VarList passed in. The code is structured to maybe handle this is the the future, but right now walking multiple trees at once is not yet supported and will produce insufficient results. Acceptable variable formats: netsnmp.VarList: - represents an list of Varbind objects to get or set. takes are arguments and unspecified number of Varbinds, or tuples which will be converted to Varbinds. netsnmp.Varbind: - represents a single MIB object to get or set implemented as Python[, , , ]. - one of the following forms: 1) leaf identifier (e.g., 'sysDescr') assumed to be unique for practical purposes 2) fully qualified identifier (e.g., '.iso.org.dod.internet.mgmt.mib-2.system.sysDescr') 3) fully qualified, dotted-decimal, numeric OID (e.g., '.1.3.6.1.2.1.1.1') - the dotted-decimal, instance identifier. for scalar MIB objects use '0' - the SNMP data value retrieved from or being set to the agents MIB. for set operations the format must be canonical to ensure unambiguous translation. The canonical forms are as follows: OBJECTID => dotted-decimal (e.g., .1.3.6.1.2.1.1.1) OCTETSTR => perl scalar containing octets, INTEGER => decimal signed integer (or enum), NETADDR => dotted-decimal, IPADDR => dotted-decimal, COUNTER => decimal unsigned integer, COUNTER64 => decimal unsigned integer, GAUGE, => decimal unsigned integer, UINTEGER, => decimal unsigned integer, TICKS, => decimal unsigned integer, OPAQUE => perl scalar containing octets, NULL, => perl scalar containing nothing, - SNMP data type (see list above), this field is populated by 'get' and 'getnext' operations. In some cases the programmer needs to populate this field when passing to a 'set' operation. this field need not be supplied when the attribute indicated by is already described in the parsed MIB. for 'set's, if a numeric OID is used and the object is not in the parsed MIB, the field must be supplied Python 'netsnmp' package variables and functions: netsnmp.verbose - default '0', controls warning/info output of themodule 0 => no output, 1 => enables warning/info (needs implementation) $SNMP::debugging - default '0', controls debugging output level within SNMP module and libsnmp 1 => enables 'SNMP::verbose' (see above) 2 => level 1 plus snmp_set_do_debugging(1), 3 => level 2 plus snmp_set_dump_packet(1) $SNMP::dump_packet - default '0', set [non-]zero to independently set snmp_set_dump_packet() Exported 'netsnmp' package utility functions: snmpget(, ) - takes args of netsnmp.Session preceded by those of the corresponding netsnmp.Session method. Returns a tuple with Varbind values fetched, and input is updated to contain complete Varbinds fetched. snmpgetnext(, ) - takes args of netsnmp.Session preceded by those of the corresponding netsnmp.Session method. Returns a tuple with Varbind values fetched, and input is updated to contain complete Varbinds fetched. snmpgetbulk(nonrepeaters, maxrepetitions,, ) - takes args of netsnmp.Session preceded by those of the corresponding netsnmp.Session method. Returns a tuple with Varbind values fetched, and VarList is updated to contain complete Varbinds fetched. snmpset(, ) - takes args of netsnmp.Session preceded by those of the corresponding netsnmp.Session method. returns True on success, otherwise False. snmpwalk(, )) - takes args of netsnmp.Session preceded by a Varbind or VarList from which the 'walk' operation will start. Returns a tuple of values retrieved from the MIB below the Varbind passed in. If a VarList is passed in it will be updated to contain a complete set of VarBinds created for the results of the walk. It is not recommended to pass in just a Varbind since you loose the ability to examine the returned OIDs. But, if only a Varbind is passed in it will be returned unaltered. Note that only one varbind should be contained in the VarList passed in. The code is structured to maybe handle this is the the future, but right now walking multiple trees at once is not yet supported and will produce insufficient results. Trouble Shooting: If problems occur there are number areas to look at to narrow down the possibilities. The first step should be to test the Net-SNMP installation independently from the Python 'netsnmp' Extension. Try running the apps from the Net-SNMP distribution. Make sure your agent (snmpd) is running and properly configured with read-write access for the community you are using. Ensure that your MIBs are installed and environment variables are set appropriately (see man mib_api) Be sure to ensure headers and libraries from old CMU installations are not being used by mistake (see -NET-SNMP-PATH). If the problem occurs during compilation/linking check that the snmp library being linked is actually the Net-SNMP library (there have been name conflicts with existing snmp libs). Also check that the header files are correct and up to date. Sometimes compiling the Net-SNMP library with 'position-independent-code' enabled is required (HPUX specifically). If you cannot resolve the problem you can email net-snmp-users@lists.sourceforge.net. Please give sufficient information to analyze the problem (OS type, versions for OS/python/net-SNMP/compiler, complete error output, etc.) Acknowledgments: Giovanni Marzot (the original author) ScienceLogic, LLC sponsored the initial development of this module. Wes Hardaker and the net-snmp-coders Thanks in advance to any who supply patches, suggestions and feedback. License: Please see the LICENSE file contained with this package Copyright: Copyright (c) 2006 G. S. Marzot. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Net-SNMP itself. Copyright (c) 2006 SPARTA, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Net-SNMP itself. ======================================================================== * COPYING ======================================================================== Various copyrights apply to this package, listed in various separate parts below. Please make sure that you read all the parts. ---- Part 1: CMU/UCD copyright notice: (BSD like) ----- Copyright 1989, 1991, 1992 by Carnegie Mellon University Derivative Work - 1996, 1998-2000 Copyright 1996, 1998-2000 The Regents of the University of California All Rights Reserved Permission to use, copy, modify and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of CMU and The Regents of the University of California not be used in advertising or publicity pertaining to distribution of the software without specific written permission. CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---- Part 2: Networks Associates Technology, Inc copyright notice (BSD) ----- Copyright (c) 2001-2003, Networks Associates Technology, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Networks Associates Technology, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 3: Cambridge Broadband Ltd. copyright notice (BSD) ----- Portions of this code are copyright (c) 2001-2003, Cambridge Broadband Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Cambridge Broadband Ltd. may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 4: Sun Microsystems, Inc. copyright notice (BSD) ----- Copyright ゥ 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Use is subject to license terms below. This distribution may include materials developed by third parties. Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Sun Microsystems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 5: Sparta, Inc copyright notice (BSD) ----- Copyright (c) 2003-2012, Sparta, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Sparta, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 6: Cisco/BUPTNIC copyright notice (BSD) ----- Copyright (c) 2004, Cisco, Inc and Information Network Center of Beijing University of Posts and Telecommunications. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Cisco, Inc, Beijing University of Posts and Telecommunications, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 7: Fabasoft R&D Software GmbH & Co KG copyright notice (BSD) ----- Copyright (c) Fabasoft R&D Software GmbH & Co KG, 2003 oss@fabasoft.com Author: Bernhard Penz Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Fabasoft R&D Software GmbH & Co KG or any of its subsidiaries, brand or product names may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 8: Apple Inc. copyright notice (BSD) ----- Copyright (c) 2007 Apple Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Apple Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 9: ScienceLogic, LLC copyright notice (BSD) ----- Copyright (c) 2009, ScienceLogic, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ScienceLogic, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ======================================================================== * python/LICENSE ======================================================================== Various copyrights apply to this package, listed in various separate parts below. Please make sure that you read all the parts. ---- Part 1: Sparta, Inc (BSD) ----- Copyright (c) 2003-2010, Sparta, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Sparta, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 2: ScienceLogic, LLC (BSD) ---- Copyright (c) 2006, ScienceLogic, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ScienceLogic, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.