Line-by-Line explanation
Dim I1 AS Integer Default * Name Interface;
This line declares the input variable I1. It specifies that it is an integer, that the default is all instances, and it is called "Interface."
Further information on the Dim statement is available in Dim declaration.
| Part of Formula | Purpose | Syntax Requirements |
|---|---|---|
| Dim | A keyword to indicate that an input variable is being declared. | Not case-sensitive. |
| I1 | The input variable. | "I" must be capitalized, and must be followed by a number. |
| AS | A keyword to indicate that the datatype of the input variable is being declared. | Not case-sensitive. |
| Integer | The datatype of the input variable. | Not case-sensitive. The valid types are listed in Instance variables. |
| Default | A keyword to indicate that default instances are being declared. | Optional, not case-sensitive. If both the Default and Name parameters are used, the Default parameter must come before the Name parameter. |
| * | The instances to use if no other instances are specified. In this case, * specifies that all instances should be used. | Default instances can be a list of values Or * to indicate that all instances should be used. See Instance variables for more information about the format for default instances. |
| Name | A keyword to indicate that a name for the input variable is being declared. | Optional, not case-sensitive. If both the Default and Name parameters are used, the Default parameter must come before the Name parameter. |
| Interface | The name to use for this input variable in the instance field of the Formula Editor. (This name will also appear in the Request Editor.) | Can contain only letters and numbers; spaces are not allowed. |
| ; | Indicates the end of the line. | Required for every line of the formula, including comments. |
delta(ifInOctets.%If)/delta(sysUpTime.0/100);
This line returns the final result. It calculates the number of incoming cells, as the number of octets divided by 53. It then divides this by the time period over which the collection was done.
| Part of Formula | Purpose | Syntax Requirements |
|---|---|---|
| delta |
A function that calculates the difference between the value retrieved during this polling and the value retrieved during the previous polling for a single SNMP variable. |
Must be lower case. |
| ifInOctets
|
A MIB object on which the calculation will be done. In this case, ifInOctets indicates the ifInOctets column of the ifTable. |
case-sensitive, must be a MIB object in a MIB compiled in Tivoli Netcool Performance Manager. |
| . | Separates the MIB object from the instance. |
Spaces are not allowed before or after. |
| %If | The instance of the MIB object. In this case, inbound bandwidth |
Must begin with %, and must match a previously defined temporary variable. |
| / | Division | Spaces before and after are optional. . |
| 53 | Used to calculate the number of cells from the number of octets. |
Spaces before and after are optional. . |
| delta | A function that calculates the difference between the value retrieved during this polling and the value retrieved during the previous polling for a single SNMP variable. |
Must be lower case. |
| sysUpTime | A MIB object on which the calculation will be done. In this case, sysUpTime indicates the time since the system was re-initialized. |
case-sensitive, must be a MIB object in a MIB compiled in Tivoli Netcool Performance Manager. |
| . | Separates the MIB object from the instance. |
Spaces are not allowed before or after. |
| 0 | The instance of the MIB object. In this case, sysUpTime is scalar, so "0" is used as the only instance. |
Spaces before and after are optional. |
| / | Division | |
| 100 | Used to calculate the number of seconds from the value of sysUpTime, which is in hundredths of a second. |
|
| ; | Indicates the end of the line. | Required for every line of the formula, including comments. |