1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
.\" $OpenBSD: snmpctl.8,v 1.9 2008/09/26 15:19:55 reyk Exp $
.\"
.\" Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: September 26 2008 $
.Dt SNMPCTL 8
.Os
.Sh NAME
.Nm snmpctl
.Nd control the SNMP daemon
.Sh SYNOPSIS
.Nm
.Op Fl n
.Op Fl s Ar socket
.Ar command
.Op Ar arg ...
.Sh DESCRIPTION
The
.Nm
program controls the
.Xr snmpd 8
daemon.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl n
Show numeric OID values instead of their symbolic names.
.It Fl s Ar socket
Use
.Ar socket
instead of the default
.Pa /var/run/snmpd.sock
to communicate with
.Xr snmpd 8 .
.El
.Pp
The following commands are available:
.Bl -tag -width Ds
.It Cm monitor
Monitor internal messages of the
.Xr snmpd 8
subsystems and engines.
.It Cm show mib
Dump the tree of compiled-in MIB objects.
.It Xo
.Cm trap send Ar oid-string
.Op Cm oid Ar oid-string Ar type value ...
.Xc
Send an SNMP trap via
.Xr snmpd 8
to the registered trap receivers.
The command takes one
.Ar oid-string
argument as the trap OID and optional varbind arguments with the specified
.Ar oid-string ,
.Ar type ,
and
.Ar value .
The following types are supported:
.Pp
.Bl -tag -width bitstringXXXXXXXX -compact
.It Cm ip Ar value
An IPv4 address.
.It Cm counter Ar value
A 32-bit counter.
.It Cm gauge Ar value
A 32-bit gauge.
.It Cm unsigned Ar value
A 32-bit unsigned integer.
.It Cm ticks Ar value
A 32-bit timeticks integer value.
.It Cm opaque Ar value
A 32-bit opaque.
.It Cm nsap Ar value
A 32-bit NSAP address.
.It Cm counter64 Ar value
A 64-bit counter.
.It Cm uint Ar value
A 32-bit unsigned integer.
.It Cm int Ar value
A 32-bit integer.
.It Cm bitstring Ar string
A bit string.
.It Cm string Ar string
An octet string.
.It Cm null
This type takes no argument.
.It Cm oid Ar oid-string
An string describing an Object ID, for example
.Ar 1.3.6.1.4.1.30155 .
.El
.El
.Sh FILES
.Bl -tag -width "/var/run/snmpd.sockXX" -compact
.It /var/run/snmpd.sock
default UNIX-domain socket used for communication with
.Xr snmpd 8
.El
.Sh SEE ALSO
.Xr snmpd 8
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 4.3 .
.Sh AUTHORS
The
.Nm
program was written by
.An Reyk Floeter Aq reyk@vantronix.net .
|