Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated CLT description to version 3.0

SNMP4J Command-Line Tool, version

...

3.

...

0.0

Type

Code Block
java -SNMP4J-CLT.jar help <command>

...

to register your license (you then do not need to enter it for subsequent commands).

Tip
titleGeneric Format

java -jar snmp4j-clt.jar [<option> [<value>]] command [subcommand [<parameter>...]]

Most commands take agent address and OID list arguments. A list of the

available options for each command is listed after the command description.
The description of all options follows the command list.

...

No Format
create-snapshot:
    create-snapshot <file> <address> <OID>



defaults:
    defaults <action>


    list

    reset

    save



dump-snapshot:
    dump-snapshot <file>



example:
    example <command>



get:
    get <address> <OID> [..]



getbulk:
    [-Cr <repeaters>] [-Cn <non-repeaters>] getbulk <address> <OID> [..]



getnext:
    getnext <address> <OID> [..]



help:
    help [command]|all



inform:
    inform <address> <OID>={<type>}<value> [..]



license:
    license



listen:
    listen <address>



mib:
    mib <action> [<mib>]


    add    <mib-file>


    del    <mib-module-name>


    list



oid:
    oid [find|find-by-descr] <regex>


    find    oid find <regex>


    find-by-descr    oid find-by-descr <regex>




set:
    set <address> <OID>={<type>}<value> [..]



smi:
    smi <OID> [..]



table:
    table <address> <OID> [..]



trap:
    [-To <notificationID>] trap <address> <OID>={<type>}<value> [..]



usmKeyusmDHKey:
    usmKey auth|priv|authPriv <address> <old> <new> [<user>]


    auth    usmKeyusmDHKey auth <address> <old> <new> [<user>]


    priv    usmKeyusmDHKey priv <address> <old> <new> [<user>]


    authPriv    usmKeyusmDHKey authPriv <address> <old> <new> [<user>]




usmUserusmDHKickstartInit:
    usmUser create|deleteusmDHKickstartInit -privateKeysFile <dhKickstartPrivKeys.properties> <address> [<user> [<cloneFromUser> [<cloneFromEngineID>]]..]



usmDHKickstartRun:
    createusmDHKickstartRun -privateKeysFile <dhKickstartPrivKeys.properties> <address> [-CE<user> <usmUserEngineID>] [-createAndWait] usmUser create..]



usmKey:
    usmKey auth|priv|authPriv <address> <user><old> [<cloneFromUser><new> [<cloneFromEngineID><user>]]


    deleteauth    [-CE <usmUserEngineID>] usmUser delete <address> <user>




v1trap:usmKey auth <address> <old> <new> [<user>]


    -Tepriv eid -Ts sid -TgusmKey gidpriv -Ta<address> addr v1trap <address> <OID>={<type>}<value> [..<old> <new> [<user>]



version:
    versionauthPriv    usmKey authPriv <address> <old> <new> [<user>]




walkusmUser:
    usmUser walkcreate|delete <address> <OID>





OPTIONS:
 <user> [<cloneFromUser> [<cloneFromEngineID>]]


    create    [-CE <usmUserEngineID>] [-createAndWait] usmUser create <address> <user> [<cloneFromUser> [<cloneFromEngineID>]]


    -Adelete    authPassphrase[-CE <usmUserEngineID>] usmUser delete Set the authentication pass phrase for<address> <user>




v1trap:
    -Te eid -Ts sid -Tg gid -Ta addr v1trap <address> <OID>={<type>}<value> [..]



version:
    version



walk:
    walk <address> <OID>





OPTIONS:
    -A    authPassphrase    Set the authentication pass phrase for 
                            authenticated SNMPv3 messages.
    -CB                     Display brief column headers. Common prefixes will 
                            be dropped.
    -CE   usmUserTableEngineID Set usmUserTableEngineID to be used as part of 
                            the index of the usmUserTable. Default is to use 
                            the authoritative engine ID (set via -e or probed) 
                            as the usmUserTableEngineID.
    -CH                     Do not display column headers.
    -Cb   bufferSize        The number of table rows to buffer before computing
                            column sizes.
    -Cc   columnWidth       Print table columns with specified character width.
    -Cf   columnSeparator   Separate table columns with the specified separator
                            string. The table is printed in compact form. By 
                            default columns are separated by spaces and 
                            authenticated SNMPv3 messagesaligned.
    -CBCh                     Display briefonly column headers.
 Common prefixes will 
-Ci                     Prepend the index for each printed  be droppedrow.
    -CECil  lowerBoundIndex  usmUserTableEngineID Set usmUserTableEngineID to be used as part of 
            the lower bound index for TABLE operations.
    -Ciu  upperBoundIndex   Set the upper bound index for TABLE operations.
    -Cl            the   index of the usmUserTable. Default is toLeft usejustify 
all cells when printing a table.
    -Cn   non-repeaters     Set the non-repeaters field for GETBULK PDUs. It 
   the authoritative engine ID (set via -e or probed) 
                specifies the number of supplied variables that 
     as the usmUserTableEngineID.
    -CH                 should not be iterated Doover. notThe displaydefault columnis headers0.
    -CbCr   bufferSizemax-repetitions   Set the max-repetitions field for TheGETBULK numberPDUs. of
 table rows to buffer before computing
                      This specifies the maximum number of columniterations sizes.
    -Cc   columnWidth       Print table columns with specified character width.
    -Cf   columnSeparator  over Separatethe tablerepeating columnsvariables. withThe thedefault specifiedis separator10.
    -Cw                     Specify the line string.width Thewhen tableprinting istables
 printed in compact form. By 
      -Djavax.net.ssl.keyStore keyStoreFile The key store file with SSL keys for 
                       default columns are separated by spacesthe andTLS protocol.
    -Djavax.net.ssl.keyStorePassword keyStorePassword The password for the key 
                 aligned.
    -Ch       store file with SSL keys for TLS.
    -Djavax.net.ssl.trustStore keyStoreFile The trust store Displayfile onlywith columntrusted headers.
    -Ci                        Prepend(public) theSSL indexkeys for eachthe printedTLS rowprotocol.
    -Cil  lowerBoundIndex   Set the lower bound indexDjavax.net.ssl.trustStorePassword keyStorePassword The password for TABLEthe operations.
    -Ciu    upperBoundIndex   Set the upper bound index for TABLE operations.
    -Cl      trust store file.
    -Dn         Left justify all cells when printing a table.
    -Cn Do not non-repeatersuse any default option values Setstored thein non-repeaters
 field for GETBULK PDUs. It 
                      config.
    -E  specifies the numbercontextEngineID of supplied variablesSet thatthe 
context engine ID used for the SNMPv3 
                     should not be iterated over. The default isscoped 0PDU.
 The authoritative engine -CrID will be max-repetitions
   Set the max-repetitions field for GETBULK PDUs. 
                  used for the context engine ID, if the latter is This
 specifies the maximum number of iterations 
                     not specified.
    -L  over the repeatinglicense variables. The default is 10.
key      -Cw Specify license and associated key. The license 
             Specify the line width when printing tables
    -Djavax.net.ssl.keyStore keyStoreFile The key store fileinfo withwill SSLbe keyssaved forin 
the SNMP4J-CLT config file in
                        the TLS protocol.
  your  -Djavax.net.ssl.keyStorePassword keyStorePassword The password for the key 
home directory. Enter each license part 
                            enclosed in storequotes, filefor withexample SSLby keys for TLS.
    -Djavax.net.ssl.trustStore keyStoreFile The trust store file with trusted 
'-L "b6 80 4d 68
                            3a 8 c0 f4" "O?fWO-3s"'
    -M  (public) SSL keysmibRepositoryPath forSet the TLSpath protocol.
to the MIB  -Djavax.net.ssl.trustStorePassword keyStorePassword The password for the 
repository to be used to 
                            resolve object trustnames store file.
    -Dn(OIDs) and parse/format object
                      Do not use any default option values stored in 
   ('repository' is the default). The 
                         config.
   repository -Edirectory must contain compiled contextEngineIDMIB 
  Set the context engine ID used for the SNMPv3 
                 modules files only.
    -Ors   maxSizeRespPDU  scoped PDU. The authoritativemaximum enginesize IDof willthe beresponse 
PDU in bytes.
    -OtCSV                  For each SNMP row usedreceived forexactly theone contextrow engineof ID,comma
 if the latter is 
                       separated values will printed to notthe specified.
console where 
  -L    license key       Specify license and associated key. The license 
       the first column contains the row index.
    -Otd           info will be saved in the SNMP4J-CLT config file in
Activates dense table operation mode which improves
                      your home directory. Enter each license parttable 
retrieval performance on regular (dense) 
                       enclosed in quotes, for example by '-L "b6 80 4d 68
    tables. This option must not be used with sparse 
                        3a 8 c0 f4" "O?fWO-3s"' tables.
    -MOttCSV    mibRepositoryPath Set the path to the MIB repository to be used to 
 Same as -OtCSV except that each row's first column 
                  resolve object names (OIDs) and parse/format object
    will report the current time (millis after 
                 values ('repository' is the default). The 
     1.1.1970) when the request has been sent.
    -Ta   agentAddress      Set the agent address repositoryfield directoryof musta containV1TRAP compiledPDU. MIBThe 
                            default modulesvalue files onlyis '0.0.0.0'.
    -MsmiTe mibRepositoryPath Set theenterpriseOID path to the MIB repositorySet tothe beenterprise usedOID tofield 
of a V1TRAP PDU.
    -Tg   genericID         Set the generic       resolve object names (OIDs) and parse/format objectID for SNMPv1 TRAPs (V1TRAP). The 
                            values ('repository'default is the0 default(coldStart).
 The MIB 
 -To   trapOID           Sets the trapOID (1.3.6.1.6.3.1.1.4.1.0) of an 
       repository    directory must contain SMI MIB files 
           INFORM or TRAP PDU. The default is 
          (v1/v2). The file names of the MIB files have to 
        1.3.6.1.6.3.1.1.5.1.
    -Ts   specificID        Set the specific ID for matchV1TRAP theirPDU. MIBThe moduledefault nameis or
 there has to be a 
                      0.
    -Tu  properties fileupTime named 'module-index.properties' 
         Set the sysUpTime field of an INFORM, TRAP, or 
          which maps to the module file by 
           V1TRAP PDU.
    -Y    privacyPassphrase Set the privacy pass phrase for  '<modulename>.path=<path>' entries.encrypted SNMPv3 
    -Ors  maxSizeRespPDU    The maximum size of the response PDU in bytes.
    -OtCSV      messages.
    -a    authProtocol    For each SNMPSet rowthe receivedauthentication exactlyprotocol oneused rowto of comma
                            separatedauthenticate valuesSNMPv3 willmessages. printedValid tovalues theare console whereMD5 
                            theand firstSHA, columnSHA224, containsSHA256, theSHA384, rowand indexSHA512.
    -Otdb    bindAddress       Set local interface and port to use for outgoing Activates
 dense table operation mode which improves
                      SNMP messages. By default this  table retrieval performance on regular (dense)is 0.0.0.0/0 (host 
                            tables.chosen Thisport optionon mustall notlocal be used with sparse 
 IPv4 addresses).
    -bc   engineBootCount   Set the engine boot count to the specified value 
            tables.
    -OttCSV            greater or equal to zero. SameDefault as -OtCSV except that each row's first column 
 is zero.
    -c    community         Set the community for SNMPv1/v2c messages.
    -createAndWait         will reportUse the current time (millis after 
   createAndWait(5) RowStatus to create new 
                         1.1.1970) when the requestrows hasinstead been sent.
    -Ta   agentAddress of createAndGo(4) which might not be 
     Set the agent address field of a V1TRAP PDU. The 
             supported on certain devices.
    -d    debugLevel    default value is '0.0.0.0'.
    -Te   enterpriseOID     Set the enterprise OID field of a V1TRAP PDU.
 Set the global debug level for Log4J logging 
               -Tg   genericID         Set theoutput. genericValid IDvalues forare SNMPv1OFF, TRAPs (V1TRAP). TheERROR, WARN, INFO, 
                            default is 0 (coldStart)and DEBUG.
    -Todhp  usmDHParameters trapOID  The octet string (provided as     Sets the trapOID (1.3.6.1.6.3.1.1.4.1.0) of an colon separated 
                            INFORMhexadecimal orstring) TRAPcontaining PDU.the TheBER default isencoded 
                            1.3.6.1.6.3.1.1.5ASN.1.
 sequence of prime -Ts(p) and base specificID(g) as defined
      Set the specific ID for V1TRAP PDU. The default is 
            by RFC2786 usmDHParamters OBJECT-TYPE. The default 
          0.
    -Tu   upTime           value Setis the(without sysUpTime field of an INFORM, TRAP, or 
line breaks):
                                  V1TRAP PDU.10:69:02:61:00:ff:ff:ff:ff:ff:ff:ff:ff:c9:0f:
    -Y    privacyPassphrase Set the privacy pass phrase for encrypted SNMPv3 
           da:a2:21:68:c2:34:c4:c6:62:8b:80:dc:1c:d1:29:
                 messages.
    -a    authProtocol      Set the authentication protocol used to    02:4e:08:8a:67:cc:74:02:0b:be:a6:3b:13:9b:22:
                            authenticate SNMPv3 messages. Valid values are MD5 
51:4a:08:79:8e:34:04:dd:ef:95:19:b3:cd:3a:43:
                             1b:30:2b:0a:6d:f2:5f:14:37:4f:e1:35:6d:6d:51:
      and SHA, SHA224, SHA256, SHA384, and SHA512.
    -bc   engineBootCount   Set the engine boot count to the specified value  c2:45:e4:85:b5:76:62:5e:7e:c6:f4:4c:42:e9:a6:
                            greater or equal to zero. Default is zero.
3a:36:20:ff:ff:ff:ff:ff:ff:ff:ff:02:01:02:02:
           -c    community         Set the community for SNMPv1/v2c messages. 01:10

    -createAndWaitdhx  diffieHellmanPropertyPrefix The property prefix used    Usewith the createAndWait(5) RowStatus to create new 
                            rowsprivateKeysFile insteadfor of createAndGo(4) which might not be 
           the usmDHKickstartInit and 
                 supported on certain devices.
    -d    debugLevel  usmDHKickstartRun commands. By default 
  Set the global debug level for Log4J logging 
                  'org.snmp4j.' is used.
    -dtls-version dtlsVersion Specifies the output.DTLS Validversion valuesto areuse. OFF,Possible ERROR,
 WARN, INFO, 
                         values are DTLSv1.0 and DEBUGDTLSv1.2 (default).
    -e    engineID          Set the authoritative engine ID of the command 
                            responder used for SNMPv3 request messages. If not 
                            supplied, the engine ID will be discovered.
    -f    1|2|3|4           Set the OID output format, where 1 = numeric, 2 = 
                            last name and numeric index, 3 = last name and 
                            formatted index without quoting, and 4 = last name 
                            and formatted index including hex-formatting of 
                            non-printable strings. The default is 4.
    -h    windowSize        Set the window height in rows. If the value is 
                            greater than zero, every windowSize rows the user 
                            is prompted to continue output. Default is zero.
    -ilo                    Do not check for lexicographic ordering errors 
                            while walking a subtree. Using this option may 
                            cause endless looping if an agent does not 
                            implement lexicographic ordering correctly!
    -l    localEngineID     Set the local engine ID of the command generator 
                            and the notification receiver used for SNMPv3 
                            request messages. This option can be used to avoid 
                            engine ID clashes through duplicate IDs leading to 
                            usmStatsNotInTimeWindows reports.
    -m    mibModuleName     Load the specified MIB module from the MIB 
                            repository specified by the -M option. The 
                            mibModuleName can be a regular expression, e.g. use
                            'SNMPv2-.*' to load all MIB modules in the 
                            repository that start with 'SNMPv2-'.
    -n    contextName       Set the target context name for SNMPv3 messages. 
                            Default is the empty string.
    -p                      Dump sent and received packets as hex string.
    -r    retries           Set the number of retries used for requests. A zero
                            value will send out a request exactly once. Default
                            is 1.
    -rsl  low|basic|secure  Set the security level strategy for auto-responses 
                            to REPORT PDUs The default is 'low' for better 
                            error handling. Use 'secure' for max. security 
                            (i.e. never send noAuthNoPriv). The basic level is 
                            conforming to RFC 3412 and 3414 allowing 
                            'noAuthNoPriv' for engine ID discovery and wrong 
                            username reports.
    -s                      Suppress any output on stderr (silent mode).
    -t    timeout           Set the timeout in milliseconds between retries. 
                            Default is 1000 milliseconds.
    -tls-local-id certAlias The local certificate alias identity which selects 
                            a certificate chain from the local key store. Only 
                            the selected certificate chain will be presented to
                            the remote SNMP engine. Use this option with the 
                            "tls:" or "dtls:" transport domain.
    -tls-peer-id subjectDN  The subject DN (e.g., "EMAILADDRESS=email@host.com,
                            C=US, CN=My Name") of the trusted certificate 
                            presented by the remote SNMP engine ID. Use this 
                            option with the "tls:" or "dtls:" transport domain.
    -tls-trust-ca issuerDN  The issuer DN (e.g., "Company Name CA") of a 
                            trusted certification authority (CA) presented by 
                            the remote SNMP engine ID for TLS and DTLS.
    -tls-version tlsVersion The TLS version to use with the 'tls:' transport 
                            protocol. Currently only 'TLSv1', 'TLSv1.1', and 
                            'TLSv1.2' are supported with Java 7 or later. 
                            'TLSv1' is the default which is supported with Java
                            6 too.
    -u    securityName      Set the security name for authenticated v3 
                            messages.
    -v    1|2c|3            Set the SNMP protocol version to be used. Default 
                            is 3.
    -w    consoleWidth      Specifies the width of the console output, default 
                            is 80 characters.
    -y    privacyProtocol   Set the privacy protocol to be used to encrypt 
                            SNMPv3 messages. Valid values are DES, AES 
                            (AES128), AES192, AES256, AES192p, AES256p, and 
                            3DES(DESEDE). The AES protocols that end with 'p' 
                            (for proprietary) are using a non-standardized key 
                            extension algorithm from 3DES.