GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BSNMP-UCD (8)

NAME

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

CONTENTS

Description
Options
Mibs
See Also
Author

DESCRIPTION

bsnmp-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.

OPTIONS

To activate the bsnmp-ucd module add this string to /etc/snmpd.config:
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"

MIBS

The 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 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 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 bsnmp-ucd module behaviour:
updateInterval Statistics update interval, in ticks. The default is 500 ticks (5 seconds).
extCheckInterval External commands check interval, in ticks. The default 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 seconds.

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.

SEE ALSO

bsnmpd(1)

AUTHOR


.An Mikolaj Golub
Search for    or go to Top of page |  Section 8 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.