OpenBSD manual page server

Manual Page Search Parameters

SNMP(1) General Commands Manual SNMP(1)

snmpsimple SNMP client

snmp get | getnext [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-O afnQqSvx] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] agent oid ...

snmp walk [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-O afnQqSvx] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] [-C cIipt] [-C E endoid] agent [oid]

snmp bulkget [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-O afnQqSvx] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] [-C nnonreprmaxrep] agent oid ...

snmp bulkwalk [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-O afnQqSvx] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] [-C cipnnonreprmaxrep] agent [oid]

snmp set [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-O afnQqSvx] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] agent varoid type value [varoid type value] ...

snmp trap [-A authpass] [-a digest] [-c community] [-E ctxengineid] [-e secengineid] [-K localpriv] [-k localauth] [-l seclevel] [-n ctxname] [-r retries] [-t timeout] [-u user] [-v version] [-X privpass] [-x cipher] [-Z boots,time] agent uptime trapoid [varoid type value] ...

snmp mibtree [-O fnS]

The snmp utility is a simple SNMP client.

The subcommands are as follows:

Retrieve the MIB for oid from the agent. If more than one oid is specified, retrieve the MIB for each one.
Retrieve the MIB that follows oid from the agent. If more than one oid is specified, retrieve the MIB following each one of them.
Retrieve all the MIBs that are branches of oid from the agent. This uses the getnext subcommand internally and requests a single MIB at a time. If no OID is specified it defaults to mib-2 (.1.3.6.1.2.1).
Retrieve the next 10 MIBs following each oid from the agent. This command is not available for -v 1.
Retrieve all the MIBs from the agent that are branches of oid. This uses the bulkget subcommand internally to retrieve multiple MIBs at a time. This command is not available for -v 1.
Set one or more OIDs to a new value. The triple varoid, type, value is described in Data types.
Send a trap message to the agent. The uptime is specified in timeticks (centiseconds) or defaults to the system uptime if an empty string is given. The trapoid is the identification OID used by the trap handler to determine its action. The triple [varoid, type, value] is described in Data types. This command is not available for -v 1.
Dump the tree of compiled-in MIB objects.

The options are as follows:

authpass
The authentication password for the user. This will be transformed to localauth. This option is only used by -v 3.
digest
Set the digest (authentication) protocol. Options are MD5, SHA, SHA-224, SHA-256, SHA-384 or SHA-512. This option defaults to MD5. This option is only used by -v 3.
appopt
Set the application specific appopt options by supplying a string of one or more of the following modifier letters:
During a walk or bulkwalk, disable checking the order of MIBs. On some devices that return MIBs out of order, this may cause an infinite loop.
endoid
Walk the tree up to but excluding endoid. The blank before endoid is mandatory.
If no branches are found during a walk, do not fall back to returning the original MIB via a get request.
Before starting a walk or bulkwalk, always do a get request on the specified oid first.
nonrep
Set the non-repeaters field in the request to the non-negative integer nonrep. This causes the first nonrep oid arguments to only return a single MIB instead of maxrep. This value defaults to 0. No blank is allowed before nonrep.
At the end of a walk or bulkwalk, show a summary of the total variables received.
maxrep
Set the max-repetitions field in the request to the positive integer maxrep. For bulkget or bulkwalk this determines the amount of MIBs to return for each specified OID. This value defaults to 10. No blank is allowed before maxrep.
Show how long it took to walk the entire tree.
community
Set the community string. Defaults to public. This option is only used by -v 1 and -v 2c.
secengineid
The USM security engine id. Under normal circumstances this value is discovered via snmpv3 discovery and does not need to be specified. This option is only used by -v 3.
ctxengineid
The snmpv3 context engine id. Most of the time this value can be safely ignored. This option is only used by -v 3.
localpriv
The localized privacy password for the user in hexadecimal format (optionally prefixed with a 0x). This option is only used by -v 3.
localauth
The localized authentication password for the user in hexadecimal format (optionally prefixed with a 0x). This option is only used by -v 3.
seclevel
The security level. Values can be noAuthNoPriv (default), authNoPriv (requires either -A or -k) or authPriv (requires either -X or -K in addition to the authNoPriv requirements). This option is only used by -v 3.
ctxname
Sets the context name. Defaults to an empty string. This option is only used by -v 3.
output
Set the output options by supplying a string of one or more of the following modifier letters:
Print the varbind string unchanged rather than replacing non-printable bytes with dots.
When displaying an OID, include the full list of MIB objects. By default only the last textual MIB object is shown.
Display the OID numerically.
Remove the type information.
Remove the type information and the equal sign.
Display the MIB name and the type information. This is the default behaviour.
Only display the varbind value, removing the OID.
Display the varbind string values as hexadecimal strings.
retries
Set the number of retries in case of packet loss. Defaults to 5.
timeout
Set the timeout to wait for a reply, in seconds. Defaults to 1.
user
Sets the username. If -v 3 is used this option is required. This option is only used by -v 3.
version
Set the snmp protocol version to either 1, 2c or 3. Currently defaults to 2c.
privpass
The privacy password for the user. This will be tansformed to localpriv. This option is only used by -v 3.
cipher
Sets the cipher (privacy) protocol. Options are DES and AES. This option is only used by -v 3.
boots,time
Set the engine boots and engine time. Under normal circumstances this value is discovered via snmpv3 discovery and does not need to be specified. This option is only used by -v 3.

The syntax for the agent argument is [protocol:]address with the follwing forms:

protocol address
| hostname[:port] | IPv4-address[:port]
| hostname[:port] | IPv6-address][:port] | IPv6-address:port
pathname

The default protocol is udp and the default port is 161; except for the snmp trap command which uses 162. udpv6 and udpipv6 are aliases for udp6; tcpv6 and tcpipv6 for tcp6. To specify an IPv6-address without a port, the IPv6-address must be enclosed in square brackets. If the square brackets are omitted, the value after the last colon is always interpreted as a port.

Additional data sent to the server is formatted by specifying one or more triples of varoid, type, and value. Supported types are:

An IPv4 Address.
A bitstring. A list of individual bit offsets separated by comma, space or tab. Must be supplied as a single argument.
A counter32.
A decimal string. A list of individual bytes in decimal form separated by space or tab.
An integer.
A null object.
An OID.
A regular string.
Timeticks in centiseconds.
Unsigned integer. Actually a normal integer for compatibility with netsnmp.
A hex string. Similar to a decimal string, but in hexadecimal format.

snmpd(8)

The snmp program first appeared in OpenBSD 6.6.

The snmp program was written by Martijn van Duren <martijn@openbsd.org>.

October 3, 2019 OpenBSD-current