GET
(and
NEXT)
syntaxes:
|
Read a variable (the next) in the MIB snmpm get <host>
{ <variable> ...... }
snmpm next <host> { <variable> ...... }
|
example:
|
snmpm get
148.52.30.30 1.3.6.1.2.1.1.1.0
read the value of the MIB object 1.3.6.1.2.1.1.1.0 for the agent whose IP address is
148.52.30.30
|
|
|
SET
|
Write in a MIB variable.
|
syntax:
|
snmpm set <host> { <variable> <type> <value> ...... }
|
example:
|
snmpm set
148.52.30.30 1.3.6.1.4.1.705.1.4.23.1.6.1
Integer
200
write the value
200
in the MIB object
1.3.6.1.4.1.705.1.4.23.1.6.1
for the agent whose IP address is
148.52.30.30
|
|
|
TRAP
|
Send a trap to an agent.
|
syntax:
|
snmpm trap <host> <enterprise> <generictrap number> <specifictrap number> { <variable> <type> <value> ...... }
|
example:
|
snmpm trap
148.52.30.30
1.3.6.1.4.1.705.1.11 6
29
1.3.6.1.4.1.705.1.3.2.1.1.4 Integer
4
send trap
29
to the agent whose IP address is
148.52.30.30
(send the value 4 associated with the object 1.3.6.1.4.1.705.1.3.2.1.1.4
|
example:
|
snmpm info
|
result:
|
Host name [saxo]
Host IP address: 148.52.30.30
|
|
|
Meaning of the fields:
|
|
<host>:
|
host Internet address
|
<variable>:
|
ASN.1 name of the variable
|
<type>:
|
type of variable (Integer, String, Internet, ObjectID)
|
<value>:
|
value to write in the variable
|
<enterprise>:
|
trap enterprise field, default value 1.3.6.1.4.1.705.1.11 corresponding to the MIB MGE traps
|
<generictrap number>
|
generic trap number, default value 6
|
<specifictrap number>
|
specific trap number
|
|
|
Utility options available:
|
|
syntax
|
snmpm [<options>] <commands>
|
/gp:number
|
GET request port number (the default value is given in the file services of the directory etc)
|
/tp:number
|
SET request port number (the default value is given in the file services of the directory etc)
|
/c:community
|
community name the default value is "public")
|
/f:file name
|
file containing the results of the command (by default the screen)
|
/t:time allocated
|
time allocated in milliseconds for a request
(by default 10000 milliseconds)
|
Brief on-line help is available by running the utility with no parameter.
|