Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
bsnmp-ucd(8)		FreeBSD	System Manager's Manual		  bsnmp-ucd(8)

     bsnmp-ucd -- an SNMP module which implements parts	of UCD-SNMP-MIB.

     bsnmp-ucd is a module for bsnmpd(1) which allows to get memory, load av-
     erage, cpu	usage and other	system statistics. It implements parts of UCD-
     SNMP-MIB for this.

     To	activate the bsnmp-ucd module add this string to /etc/snmpd.config:

	   begemotSnmpdModulePath."ucd"	= "/usr/local/lib/"

     The counters will be available under the following	MIB:


     Or	if the appropriate MIB file has	been installed:


     With bsnmp-ucd you	can also extend	bsnmpd agent functionality specifying
     arbitrary commands	in UCD-SNMP-MIB::extTable. To add new command you
     should add	following lines	in bsnmpd(1) configuration file, in bsnmp-ucd
     module section:

	   extNames.<INDEX> = <name>
	   extCommand.<INDEX> =	<commandline>

     For example, to collect lastpid statistics	under mib UCD-SNMP-
     MIB::extOutput.0 you can specify:

	   extNames.0 =	"lastpid"
	   extCommand.0	= "/sbin/sysctl	-n kern.lastpid"

     Note: Index order is important. Commands should be	indexed	beginning from
     0 and without gaps.

     When program has finished,	the exit status	is available via extResult mib
     and the first line	of output is placed in extOutupt mib. The next time
     the program will be run only after	some period of time (this period is
     set in sources and	can be changed only by recompiling module).

     It	is possible to specify command that will be run	to fix problem when
     extension command returns nonzero status. For this, together with previ-
     ous two mibs for extension	command, the following mibs should be set:

	   extErrFix.<INDEX> = 1
	   extErrFixCmd.<INDEX>	= <fix command>

     For example, to monitor apache and	restart	process	when it	is down, you
     can add to	configuration file:

	   extNames.1 =	"apache"
	   extCommand.1	= "/usr/local/etc/rc.d/apache status"
	   extErrFix.1 = 1
	   extErrFixCmd.1 = "/usr/local/etc/rc.d/apache	restart"

     Also, it is possible to monitor processes using prTable. For example:

	   prNames.0 = "httpd"
	   prMin.0 = 3
	   prMax.0 = 100

	   prErrFix.0 =	1
	   prErrFixCmd.0 = "/usr/local/etc/rc.d/apache22 restart"

     There several parameters that can be used to tune bsnmp-ucd module	behav-

     updateInterval	Statistics update interval, in ticks.  The default is
			500 ticks (5 seconds).

     extCheckInterval	External commands check	interval, in ticks.  The de-
			fault is 100 ticks (1 second).

     extUpdateInterval	External commands update interval (used	e.g. by	fix
			commands executor), in ticks.  The default is 3000
			ticks (30 secondd).

     extTimeout		External commands start	timeout.  The default is 60

     The parameters can	be changed either in bsnmpd(1) configuration file, in
     bsnmp-ucd module section, or at run time, setting the corresponding mibs
     under UCD-SNMP-MIB::ucdavis.1.


     Mikolaj Golub

bsnmp-ucd		       October 11, 2013			     bsnmp-ucd


Want to link to this manual page? Use this URL:

home | help