man(1) Manual page archive


     SNMPFS(4)                                               SNMPFS(4)

     NAME
          snmpfs - SNMP v1 & v2c filesystem interface  plan9

     SYNOPSIS
          snmpfs [ -D ] [ -a addr ] [ -s srvname ] [ -m mtpt ] [ -n
          ndb ]

     DESCRIPTION
          Snmpfs presents a file interface to the SNMP version 1 and
          version 2c protocol.

     USAGE
          -D    prints debug information (from 9p and snmp).

          -a   specify an address to listen.

          -s   specify a servicename to post in /srv.

          -m   specify a mount point.

          -n   specify an alternate ndb file.

          During the mount stage a hostname or the keyword all can be
          supplied to show a particular host or all with the parameter
          snmp=enabled in the ndb file. There is no user authentica-
          tion.

          The filesystem layout its built at startup based on the
          information provided by ndb, a restart is needed in case of
          layout changes on ndb. rocomm, rwcomm, timeout, retries,
          timeout, version, nrep and maxrep parameters, can be updated
          without restart.

          Snmpfs resolves some MIBS translated from unix to a ndb
          file. The translation match an OID name and returns an OID
          in digit form.

          The operation to be done with the translated oids is not
          specified, so the user should choose an appropiate one.

          The default operation getnext will work with the leafs
          defined (i.e. sysDescr/1.3.6.1.2.1.1.1)  and will give the
          next leaf if a branch (i.e system/1.3.6.1.2.1.1) is used.

     CONFIGURATION
          Snmpfs uses the system ndb to read the parameters needed:

          oid= should be an OID in its numeric form (1.3.6.1.2.1.1.0)
               or in its name form (sysDescr). The names are resolved
               using the system ndb(8). A file snmp.ndb is provided

     SNMPFS(4)                                               SNMPFS(4)

               with the basic mibs. Whatever name/oids combinations
               can be added to support special or private oids.

          op=  parameter specifies the operatin that should be done
               with an oid. The operations supported are get, getnext,
               walk, bulk, set. Its default value is getnext.

          rocomm=
               specifies the read-only community. public is the
               default value.

          rwcomm=
               specifies the read-write community.  private is the
               defdault value.

          version=
               specifies version 1 (default) or 2 to match snmp v1 or
               snmp v2c.

          retries=
               set the number (1 as default) of times the library will
               ask a host for the snmp packet specified.

          nrep=
               set the number (5 as default) of replies of a bulk
               request, this option should go with op=bulk option.

          maxrep=
               set the number of... (10 as default)

          setval=
               sets a value in a read-write oid. a rwcomm should be
               supplied. There is no default value, if no value is
               set, the behaviour is undefined.

          timeout=
               sets the time (5 seconds by default) to wait for an
               answer from the snmp server.

          All those params should be bound with a sys entry in the
          local ndb file.

     EXAMPLES
          This example gets the value of sysDescr from the host
          www.snmp.org using the default values os the snmp parame-
          ters:

               cpu% snmpfs -s snmpfs
               cpu% mount -c /srv/snmpfs /n/snmp all
               cpu% mkdir /n/snmp/www.snmp.org
               cpu% touch /n/snmp/www.snmp.org/sysDescr
               cpu% cat /n/snmp/www.snmp.org/sysDescr

     SNMPFS(4)                                               SNMPFS(4)

               ((1.3.6.1.2.1.1.1.0) (Linux release:2.0.36 machine:i686) (noError))
               cpu%

          The following is an ndb entry sample:

          ip=192.147.142.110 sys=www dom=snmp.org
               snmp=enabled
               oid=sysDescr,sysUpTime op=get
               oid=system op=walk
               rocomm=public
               timeout=5
               retries=1

     FILES
          /$objtype/bin/aux/snmpfs

          /sys/man/4/snmpfs

          /lib/ndb/snmp

     SOURCE
          /n/sources/contrib/gabidiaz

     BUGS
          Please report bugs to gabidiaz@gmail.com.