formGet command

formGet command retrieves information in agents using SNMP protocol.

In Tivoli® Netcool® Performance Manager, with multiple collector on single host we can use the formGet with particular collector as follows:

  1. source dataLoad.env -i <Instance Number>
  2. formGet <OPTIONS> run the formGet on particular collector associated with the given instance ID
    OR
    formGet <OPTIONS> -n <COLLECTOR_ID>
    runs the formGet for particular collector with given collector id

SYNOPSIS

formGet {<target>|-eid <elementId>|-sid <subElementId>} {<expression>|-ff <formulaFile>|-fid <formulaId>}
[-i <instances>] [-m <mibs>] [-c <readCommunity>] [-t <timeout>] [-r <tries>]
[-re <repeatNumber> [-pe <periodBetweenRepeats>]] [-dt <dataType>] [-TL <traceLevel>] [-D <debugLevel>]
[-sim <simulationFile>] {-all | -n <collNumber> | [-S <server> [-P <port>]]} [-?] [--version] 

Options

Mandatory target definition with three possible forms:

Table 1. Options for formGet command
Option Description
<target> This is the IP address or the name of the SNMP device.
-eid <elementId> elementId is the database ID of an Element.
-sid <subElementId> subElementId is the database ID of a subElementId.

When that option is selected, instance (-i) is of no use and can be ignored.

Mandatory expression definition with three possible forms:
Table 2. Options for formGet command
Option Description
<expression> This is the content of the formula to test. Each line of formula script should be separated by a semi column ';' character.
-ff<formulaFile> formulaFile is a text file (local to the formGet tool), that contains the expression of the formula
-fid<formulaId> formulaid is the database ID of the formula. When that option is selected, Mibs (-m) and dataType (-dt) are of no use and can be ignored.
-i<instances> The instance(s) to use for that formula. format is a series of InstanceName <InstanceValue>, each InstanceValue is assigned to a %Ix variable in the order they are defined in the <instances> string.exemple: 'Port<4>Slot<7>', will map to %I1=4, %I2=7.
-m<mibs> The compiled Mib file name that contains the definition for the required oid. This is a .oid file, without path. The file is expected to be found in the SNMP dataload's mibs/oid directory. If more than one file is required, a list of files names, separated by spaces has to be provided in one single argument: -m "mib1 mib2"
-c<readCommunity> The read community to use to perform the action if different from the default read community configured in SNMP_CONF for that device. a specific SNMP protocol version can also be forced, by prefixing the community name with &V1, &V2c or &V3.
-t<timeout> The SNMP timeout to use. Default value is defined in the SNMP_CONF for that device
-r<tries> The number of SNMP tries (1 or more). Default value is defined in the SNMP_CONF for that device
-re<repeatNumber> The number of times to repeat the execution of the formula, default is 1. A formula that contains delta( ), diff( ) or last( ) operators will requires 2 consecutive runs to produce the first result.
-pe<periodBetweenRepeats> The time in seconds between two execution of the formula (only if -re<repeatNumber>is defined and > 1
-dt<datatype> <datatype> is either 'float' or 'string', default is 'float'
-TL<traceLevel> <traceLevel> is either 'no' or 0, 'failure' or 1, 'info' or 2, 'debug' or 3.
-D<debugLevel> <debugLevel> is a number between 0 and 6. 0 represents no debug, 6 is the most verbose.
-sim<simulationFile> <simulationFile> is a file, on the collector machine, that is used in place of the remote SNMP agent. This file can be obtained using a snmpGet with the -f PROVISO parameter.
-all All SNMP dataload currently running in the system will receive the request.
-n<collectoNumber> The request will only be sent to SNMP dataload process running collection set number <collectoNumber>.
-S<servername> <servername> is the name of the machine that hosts a specific SNMP dataload. If this switch is not defined, 'localhost' is assumed.
-P<portNumber> <portNumber> is the listening port number of the SNMP dataload. If this switch is not defined, the value of the DL_ADMIN_TCP_PORT environment variable will be used. If the environment variable is not defined, 3002 is assumed. If none of the -all, -n, -S and -P switches are specified, then localhost:3002 will be assumed.
-? Display this usage page.
--version Display copyright and version information.

Examples

Table 3. Examples of formGet command
Use Syntax
Get traffic inbound+outbound on all first 10 interfaces of a router using RFC1213 (default): formGet 192.168.1.1 "ifInOctets.%I1 + ifOutOctets.%I1" -i "If<1-10>"
Get increase of inbound traffic every 5 sec (for 30 sec) on first 10 interfaces of a router using RFC1213 (default) and using a remote SNMP collector on machine <host>, on <port> formGet 192.168.1.1 "deltaformGet 192.168.1.1 "delta(ifInOctets.%I1)" -i "If<1-10>"-pe 5 -re 6 -S <host>-P <port>
Test, with debug traces, a discovery formula stored in a text file, against a device file: basicElement.txt
Dim I1 as Integer default *;
Def MaxLines 12 ;
V1=OIDVAL( firstN(1, filter( not
(ifPhysAddress.%I1 like "") && not
(ifPhysAddress.%I1 like "6.0.0.0.0.0.0"
) ) ) );
V2=OIDVAL(ifPhysAddress.%I1 format clean);
V3=OIDVAL(sysName.0 );
V4=OIDVAL(sysDescr.0 );
V5=OIDVAL(ifNumber.0);
%V1 index "NULL||%HOSTNAME|
|ipAddress<%HOSTIP>rCommunity
<%USEDRCOMMUNITY>sysName
<%V3>sysDescr<%V4>ifNumber
<%V5>physAddress<%V2>||%V3/%V5/%V2";
formGet 192.168.1.1 -ff basicElement.txt -i "If<*>" -TL 2