1. snmpget.java -
Get one or more SNMP variables.
Usage:
java snmpget [-v version(v1,v2)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-d] host OID [OID] ...
Example:
java snmpget -m "../../mibs/RFC1213-mib" 10.3.2.120 ifType.2 ifDescr.2
java snmpget -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 ifType.2 ifDescr.2
2. snmpgetnext.java -
Perform a getnext on one or more SNMP variables.
Usage:
java snmpgetnext [-v version(v1,v2)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-d] host OID [OID] ...
Example:
java snmpgetnext -m "../../mibs/RFC1213-mib" 10.3.2.120 ipRouteDest ipRouteNextHop
java snmpgetnext -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 ipRouteDest ipRouteNextHop
3. snmpgetbulk.java -
Get SNMP variables in bulk.
Usage:
java snmpgetbulk [-v version(v2,v3)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-nr non-repeaters] [-mr max-repetitions] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-d] host OID [OID] ...
Example:
java snmpgetbulk -m "../../mibs/RFC1213-mib" -nr 0 -mr 50 10.3.2.120 ifType.2 ifDescr.2
java snmpgetbulk -v v3 -nr 0 -mr 50 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" localhost 10.3.2.120 ifType.2 ifDescr.2
4. snmpset.java -
Perform an SNMP set on one or more SNMP variables.
Usage:
java snmpset [-c community] [-p port] [-t timeout] [-r retries] [-v version(v1,v2,v3)] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] -m MIB_files host [OID value] ...
Example:
java snmpset -m "../../mibs/RFC1213-mib" 10.3.2.120 sysLocation.0 paradise sysName.0 whatever
java snmpset -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 sysLocation.0 paradise sysName.0 whatever
5. snmpset_without_mib.java -
Perform an SNMP set on one or more SNMP variables without the loading of MIBs.
Usage:
java snmpset_without_mib [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-d debug] host OID {INTEGER | STRING | GAUGE | TIMETICKS | OPAQUE | IPADDRESS | COUNTER | OID } value [OID type value]
Example:
java snmpset_without_mib -v v2 10.3.2.120 1.5.0 STRING whatever 1.6.0 STRING here
java snmpset -v v3 -u initial -w initialPass -a MD5 10.3.2.120 1.6.0 paradise 1.5.0 whatever
6. snmpwalk.java -
Perform an SNMP walk with one or more OIDs.
Usage:
java snmpwalk [-v version(v1,v2,v3)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol] [-w auth_password] [-s priv_password] host OID [OID] ...
Example:
java snmpwalk -m "../../mibs/RFC1213-mib" 10.3.2.120 interfaces
java snmpwalk -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 interfaces
7. sendtrap.java -
Send SNMP v1 traps using the high-level APIs.
Usage:
java sendtrap [-c community] [-m MIB_files] [-p port] \nhost enterprise agent-addr generic-trap specific-trap timeticks \n[OID value] ...
Example:
java sendtrap -m "../../mibs/RFC1213-mib" 10.3.2.121 snmp 10.2.2.120 3 0 1001 ifIndex.2 2
8. sendv2trap.java -
Send SNMP v2c and v3 traps using the high-level APIs.
Usage:
java sendv2trap [-d Debug] [-v version(v2,v3)] [-c community] [-p port] [-e engineID(0x...)] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-i contextName] -m MIB_file host timeticksvalue trapOID [ OID value ] ...
Example:
java sendv2trap -m "../../mibs/RFC1213-MIB" -v v3 -p 2000 -e 0x12345 -u testuser -a MD5 -w pass localhost 10000 .1.3.6.1.2.4.1.11 1.5.0 snmp
9. sendinform.java -
Send SNMP inform messages using the high-level APIs.
Usage:
java sendinform [-d Debug] [-v version(v2,v3)] [-c community] [-p port] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-i contextName] -m MIB_file host timeticksvalue trapOID [ OID value ] ...
Example:
java sendinform -m "../../mibs/RFC1213-MIB" -v v3 -p 2000 -a MD5 -w pass localhost 10000 .1.3.6.1.4.1.11 1.5.0 snmp
10. trapreceiver.java -
Receive and print SNMP traps.
Usage:
java trapreceiver [-v version(v1,v2)] [-m MIB_files] [-c community] [-p port]
Example:
java trapreceiver -m "../../mibs/RFC1213-mib" -p 162
11. snmpinformreq_receiver.java -
Receive and print SNMP INFORM requests.
Usage:
java snmpinformreq_receiver [-m MIB_files] [-c community] [-p port] [-u user] [-e engineID] [-a auth_protocol] [-w auth_password] [-s priv_password]
Example:
java snmpinformreq_receiver -m "../../mibs/RFC1213-MIB" -p 2000
12. getSnmpTable.java -
Get an SNMP table row by row using the API's SnmpTable class.
Usage:
java getSnmpTable [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-n contextname] [-i contextID] [-d debug] host tableOID MIB_files
Example:
java getSnmpTable -v v2 -m "../../mibs/RFC1213-mib" 10.3.2.120 ipRouteTable
java getSnmpTable -v v3 -u initial -w initialPass -a MD5 10.3.2.120 ipRouteTable ../../mibs/RFC1213-MIB
13. gettable.java -
Get and print an SNMP table.
Usage:
java gettable [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-n contextName] [-i contextID] [-d debug] host tableOID MIB_files
Example:
java gettable -m "../../mibs/RFC1213-mib" 10.3.2.120 ifTable
java gettable -v v3 -u initial -w initialPass -a MD5 10.3.2.120 ifTable ../../mibs/RFC1213-MIB
14. walk_indexes.java -
Get one or more SNMP variables.
Usage:
java walk_indexes [-v version(v1,v2,v3)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-d] host OID
Example:
java walk_indexes -v v2 -m "../../mibs/RFC1213-mib" 10.3.2.120 tcpConnLocalAddress
java walk_indexes -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 tcpConnLocalPort
15. snmpget_by_index.java -
Get one or more SNMP variables.
Usage:
java snmpget_by_index [-v version(v1,v2,v3)] [-m MIB_files] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a auth_protocol] [-w auth_password] [-s priv_password] [-d] host OID index [index] ...
Example:
java snmpget_by_index -v v2 -m "../../mibs/RFC1213-mib" 10.3.2.120 atIfIndex 2 128.253.154.1
java snmpget_by_index -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 atPhysAddrress 2 128.253.154.1
java snmpget_by_index -v v3 -u initial -w initialPass -a MD5 -m "../../mibs/RFC1213-mib" 10.3.2.120 ifDescr 2
16. snmpaddrow.java -
Add a row to the table.
Usage:
java snmpaddrow [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-d debug] host MIB_files OID value
[OID value] ...
Example:
java snmpaddrow localhost "../../mibs/agent-sample-mib.txt" managerHost.5 local managerPort.5 2000 rowStatus.5 4-p 8001
17. snmpdelrow.java -
Delete a row to the table.
Usage:
java snmpdelrow [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-d debug] host MIB_files rowStatusOID.index
Example:
java snmpdelrow localhost -p 8001 "../../mibs/agent-sample-mib.txt" rowStatus.5
18. setTableValue.java -
Set the value of a particular cell of the table.
Usage:
java setTableValue [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-n
contextname] [-i contextID] [-d debug] host MIB_files tableOID value rowIndex columnIndex
Example:
java setTableValue localhost ../../mibs/agent-sample-mib.txt forwardingTable value 0 1 -p 8001
19. encodeTableIndex.java -
Get all the column oids of the table with appended index (instance) values with
it. This example will encode the index if it is in type like octetstring .
Usage :
java encodeTableIndex tableOID MIB-File index [indices..]
Example:
java encodeTableIndex atTable ../../mibs/RFC1213-MIB 1 192.168.1.45
20. getColumn.java -
Get a column from the table.
Usage:
java getColumn [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-n
contextname] [-i contextID] [-d debug] host MIB_files columnName
Example:
java getColumn localhost ../../mibs/RFC1213-MIB ifType
21. getRow.java -
Get a row from the table.
Usage:
java getRow [-v version(v1,v2,v3)] [-c community] [-p port] [-t timeout] [-r retries] [-u user] [-a
auth_protocol(MD5/SHA)] [-w auth_password] [-s priv_password] [-n
contextname] [-i contextID] [-d debug] host tableOID MIB_files rowIndex
Example:
java getRow localhost ifTable ../../mibs/RFC1213-MIB 1
22. getTableInfo.java -
Get the information about the table.
Usage:
java getTableInfo ColumnOID MIB_FILE
Example:
java getTableInfo ifType ../../mibs/RFC1213-MIB
23. requestServerDemo.java -
Perform asynchronous requests by using SnmpRequestServer. Edit the requestServerDemo.html file to put in the correct host and
community.
Usage:
appletviewer requestServerDemo.html
Note:
For jdk1.2 the classpath should be specified in the command line as
follows.
appletviewer -J-Xbootclasspath:applications.jar;.\..\jars\AdventNetLogging.jar;..\..\jars\AdventNetSnmp.jar;<JDK_HOME>\jre\lib\rt.jar
requestServerDemo.html
In addition, the HTML file should also be customized. Refer Help documentation for details.
24. snmpPollerDemo.java -
Perform automatic polling of SNMP variables by using SnmpPoller. Edit the snmpPollerDemo.html file to put in the correct host and
community.
Usage:
appletviewer snmpPollerDemo.html
Note:
For jdk1.2 the classpath should be specified in the command line as
follows:
appletviewer -J-Xbootclasspath:applications.jar;.\..\jars\AdventNetLogging.jar;..\..\jars\AdventNetSnmp.jar;<JDK_HOME>\jre\lib\rt.jar
snmpPollerDemo.html
In addition, the html file should also be customized. Refer Help documentation for details.
|