MIB Smithy

  1. Up to Table of Contents

Querying Record and Database Properties

Record and Database properties are queried using the get subcommand for the database containing the specified record or its self. The available properties depend on the record type whose properties are desired, although a number of properties (such as -name and -fullname) are shared by most record types. Properties are also available that allow the user to direct their query to properties such as OID values and types either "as specified" directly in the definition of the record or "as inherited" from any references to other definitions, depending on which information is desired. This get subcommand can also be used to obtain a list of available databases.

Starting with version 3.0, multiple properties for a single record can be queried in one call. This can be used to optimize scripts that need to get several properties by avoiding the overhead of searching the database for the record with each individual property.


% dbcmd get property ?property ...? ?-exact? ?recordName?


is the name of the database;
is the name of the property desired; and
is a record search string (name, OID, or combination of such) identifying the record to be queried. If the property and recordName fields are omitted, then the get subcommand returns a list of available databases (including the master database). Consult the section on the appropriate record type for a list of available properties.
The -exact option can be specified to force exact matching of the search specification where extra subidentifiers may have been provided. For example, querying most properties for "sysDescr.0" will normally return the properties for sysDescr. If -exact is specified, "sysDescr" will match but "sysDescr.0" will generate an error due to no record existing with that exact OID value.


  • The value of the specified property. If the property has not been set, then it may return either an empty string or "undefined" depending on the property.
  • If multiple properties are specified in the call, the result will be a list with each element corresponding to the individual property results, in the same order.

See Also

Example 1 - Getting the data type for a specified object:

% smilib get -syntax sysDescr

Example 2 - Getting the declared ("as specified") OID value:

% smilib get -valuedecl exampleID

Example 3 - Getting the OID value ("as used") for a record:

% smilib get -value exampleID

Example 4 - Getting the fully-qualified OID value:

% smilib get -fulloid sysDescr.0

Example 5 - Querying multiple properties:

% smilib get -fulloid -fullname sysDescr.0 @File1!SNMPv2-MIB!sysDescr
  1. Up to Table of Contents