NAME
snmpctl —
control the SNMP daemon
SYNOPSIS
snmpctl |
[-n] [-s
socket] command
[arg ...] |
DESCRIPTION
The snmpctl program controls the
snmpd(8) daemon. Commands may be abbreviated to the minimum
unambiguous prefix; for example, s m for
show mib.
The options are as follows:
-n- Show numeric OID values instead of their symbolic names.
-ssocket- Use socket instead of the default /var/run/snmpd.sock to communicate with snmpd(8).
The following commands are available:
monitor- Monitor internal messages of the snmpd(8) subsystems and engines.
show mib- Dump the tree of compiled-in MIB objects.
snmprequest host [options]- Request information from an SNMP agent that is running on the specified
host. The request can be
either
get,walkorbulkwalkto retrieve a single SNMP value or a subtree. The following options are supported:communityvalue- Set the SNMPv2 community; the default is ‘public’.
oid(all|value)- Set the start OID; the default is ‘system’. This option can be specified multiple times.
versionvalue- Set the SNMP version, either
1or2c. The default is2c.
trap sendoid-string [oidoid-string type value ...]- Send an SNMP trap via
snmpd(8) to the registered trap receivers. The command takes one
oid-string argument as the trap OID and optional
varbind arguments with the specified oid-string,
type, and value. The following
types are supported:
ipvalue- An IPv4 address.
countervalue- A 32-bit counter.
gaugevalue- A 32-bit gauge.
unsignedvalue- A 32-bit unsigned integer.
ticksvalue- A 32-bit timeticks integer value.
opaquevalue- A 32-bit opaque.
nsapvalue- A 32-bit NSAP address.
counter64value- A 64-bit counter.
uintvalue- A 32-bit unsigned integer.
intvalue- A 32-bit integer.
bitstringstring- A bit string.
stringstring- An octet string.
null- This type takes no argument.
oidoid-string- An string describing an Object ID, for example 1.3.6.1.4.1.30155.
walkhost- Alias for
snmp walkhost, see above.
FILES
- /var/run/snmpd.sock
- default UNIX-domain socket used for communication with snmpd(8)
SEE ALSO
HISTORY
The snmpctl program first appeared in
OpenBSD 4.3.
AUTHORS
The snmpctl program was written by
Reyk Floeter
<reyk@openbsd.org>.