|
NAMEbsnmp-ucd —
an SNMP module which implements parts of UCD-SNMP-MIB.
DESCRIPTIONbsnmp-ucd is a module for
bsnmpd(1)
which allows to get memory, load average, cpu usage and other system
statistics. It implements parts of UCD-SNMP-MIB for this.
OPTIONSTo activate thebsnmp-ucd module add this string to
/etc/snmpd.config:
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so" MIBSThe counters will be available under the following MIB:.1.3.6.1.4.1.2021 Or if the appropriate MIB file has been installed: UCD-SNMP-MIB::ucdavis With 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 previous 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
The parameters can be changed either in
bsnmpd(1)
configuration file, in SEE ALSObsnmpd(1)AUTHORMikolaj Golub
Visit the GSP FreeBSD Man Page Interface. |