Home
You are not currently signed in.

MIB Smithy

  1. Up to Table of Contents

Quering SNMP Session Parameters

The SNMP Session's cget subcommand is used to query configuration parameters for the given session. The parameters are generally the same as those provided by the config subcommand.

Syntax:

% snmpcmd cget parameter

Where:

snmpcmd
is the name of session to be queried; and
parameter
specifies configuration parameter whose value is desired.

Returns:

  • The current value of the specified parameter (see below).

Session Parameters

-authpass
Returns the password that will be used when sending or receiving authenticated SNMPv3 messages.
-authkey
Returns the unlocalized key that will be used when sending or receiving authenticated SNMPv3 messages.
-authproto
Returns the Authentication Protocol used to send SNMPv3 authNoPriv and authPriv messages when an Authentication Password has been set. The value returned will either be HMAC-SHA-96 or HMAC-MD5-96.
-authzkey
Returns the localized key that will be used when sending or receiving authenticated SNMPv3 messages in the non-authoritative role.
-ctxengineid
Returns the contextEngineID value to use for SNMPv3 messages. An empty string (default) indicates that the same value as msgAuthoritativeEngineID is to be used for contextEngineID.
-ctxname
Returns the contextName value to use for SNMPv3 messages.
-db
Returns the name of the configured SMI Database.
-delay
Returns the configured delay (in milliseconds) the session will wait before sending each SNMP message.
-engineid
Returns the SNMPv3 snmpEngineID of the remote SNMP agent, or the value that has been configured manually. Note that this value may be overwritten automatically in response to a usmStatsUnknownEngineIDs report PDU from the agent.
-hostname
Returns the hostname for the host where the SDK is running.
-localaddress
Returns the address or hostname of the local interface on which to listen for incoming notifications, when configured to do so. When set to an empty string (default) the SDK will listen for notifications on all applicable interfaces.
-localboots
Returns value of the session's own snmpEngineBoots. This property is used when the session is acting in an authoritative role (e.g. to receive SNMPv3 inform requests).
-localengid
Returns value of the session's own snmpEngineID. This property is used when the session is acting in an authoritative role (e.g. to receive SNMPv3 inform requests).
-localport
Returns the port number to be used for receiving notifications if a notification handler is registered with the bind command.
-localtime
Returns value of the session's own snmpEngineTime. This property is used when the session is acting in an authoritative role (e.g. to receive SNMPv3 inform requests).
-locauthzkey
Returns the localized key that will be used when sending or receiving authenticated SNMPv3 messages in the authoritative role.
-locprivzkey
Returns the localized key that will be used when sending or receiving encrypted SNMPv3 messages in the authoritative role.
-logchannel
Returns a two-element list indicating the file channels configured for logging of hex dumps of sent and received packets, respectively. Returns an empty string if logging is disabled.
-logcommand
Returns the name of the currently configured log callback procedure to be invoked for sent/received SNMP messages.
-privpass
Returns the password that will be used when sending or receiving encrypted SNMPv3 messages.
-privkey
Returns the unlocalized key that will be used when sending or receiving encrypted SNMPv3 messages.
-privproto
Returns the Authentication Protocol used to send SNMPv3 authNoPriv and authPriv messages when an Authentication Password has been set. As of this writing, DES/CBC and AES128/CFB are supported.
-privzkey
Returns the localized key that will be used when sending or receiving encrypted SNMPv3 messages in the non-authoritative role.
-readcommunity
Returns the configured community string used to transmit SNMPv1 and SNMPv2c GET, GET-NEXT and GET-BULK requests.
-remoteaddress
Returns the IPv4 or IPv6 address of the configured agent to which SNMP requests are sent.
-remoteport
Returns the port name or number to which SNMP requests are sent.
-retries
Returns the number of followup attempts that will be made to complete the request if the first transmission yields no response.
-timeout
Returns the integer timeout (in milliseconds) waited between each transmission prior to resending or signalling a timeout to the calling script.
-username
Returns the SNMPv3 User Name used to send messages using the User-Based Security Model, regardless of security level.
-version
Returns the configured SNMP version (SNMPv1, SNMPv2c or SNMPv3).
-window
Returns the maximum number of pending SNMP requests allowed to be queued before further requests are held for transmission.
-writecommunity
Returns the configured community string used to transmit SNMPv1 and SNMPv2c SET requests.
  1. Up to Table of Contents