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?
dbcmd
property
recordName
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.-exact
-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.% smilib get -syntax sysDescr DisplayString
% smilib get -valuedecl exampleID exampleParent.a(1).3
% smilib get -value exampleID exampleParent.1.3
% smilib get -fulloid sysDescr.0 1.3.6.1.2.1.1.1.0
% smilib get -fulloid -fullname sysDescr.0 1.3.6.1.2.1.1.1.0 @File1!SNMPv2-MIB!sysDescr