SunSNMP

=Configure SNMP= The SMF service that SNMP runs from is SMA
 * SMA is started by the script /lib/svc/method/svc-sma
 * The SNA script uses /etc/sma/snmp/snmpd.conf. You will need to edit this.
 * 1) Change the line:  #DISABLE=YES to #DISABLE=NO
 * 2) comment out rwcommunity line
 * 3) change the rocommunity password to either the sitewide community password or to something other than public
 * 4) restart SNMP: svcadm restart sma

There is also the SMF service SNMPDX
 * similar to above, but uses /etc/snmp/conf/snmpd.conf.

=Setup NET-SNMP= (from here) The snmp daemon in Solaris doesn't support 64-bit counters, so you should compile net-snmp: ./configure --prefix=/usr/local --enable-mfd-rewrites '--with-mib-modules=host ucd-snmp/diskio' \ --disable-embedded-perl --with-sys-contact="syscom@csclub.uwaterloo.ca" --with-sys-location="MC 3015" \ --with-default-snmp-version=3 --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp" * In include/net-snmp/system/solaris.h add '#define NEW_MIB_COMPLIANT 1' to the bottom. make; make install

Create /tmp/net-snmp.xml:  <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">                <property_group name='general' type='framework'> <propval name='action_authorization' type='astring' value='solaris.smf.manage.net-snmp' /> </property_group> <stability value='Unstable' /> <common_name> <loctext xml:lang='C'>net-snmp </common_name> <manpage title='net-snmp' section='1M' manpath='/usr/share/man' /> </service_bundle>

Import the manifest: svccfg import /tmp/net-snmp.xml

Create /lib/svc/method/svc-net-snmp: . /lib/svc/share/smf_include.sh if [ -x /usr/local/sbin/snmpd ]; then /usr/local/sbin/snmpd -c /etc/snmp/conf/snmpd.conf else echo "snmpd is missing or not executable." exit $SMF_EXIT_ERR_CONFIG fi exit $SMF_EXIT_OK
 * 1) !/bin/sh
 * 1) Start processes required for snmpd

Set the permissions: chown root:bin /lib/svc/method/svc-net-snmp chmod 555 /lib/svc/method/svc-net-snmp
 * To test the results