
Writing Technician Interface Scripts
2-16
308660-14.00 Rev 00
instenv
The
instenv
command allows you to define a pseudo-variable array that contains
the list of MIB instance IDs for a given MIB object name. The
instenv
command
builds a pseudo-variable array by appending an index number to the variable name
specified on the command line. Each member of the pseudo-variable array
contains a single instance ID. The size of the pseudo-array is stored at index 0.
Syntax
The
instenv
command has the following syntax:
instenv
<array_name> <object>
<array_name>
is the name you assign the pseudo-variable array.
<object>
is the name of the MIB object table from which to retrieve the
information.
Example 1
The first four lines in the following example show how you list the instance IDs
for wfIpInterfaceEntry to the console; the last nine lines show how you use the
instenv
command to assign these instance IDs to a pseudo-variable array.
$list -i wfIpInterfaceEntry
inst_ids = 192.32.23.5.1
192.32.7.8.2
192.32.2.3.3
$instenv ip_ wfIpInterfaceEntry
$echo Size: ${ip_[0]}
Size: 3
$echo “1: ${ip_[1]}”
1: 192.32.23.5.1
$echo “2: ${ip_[2]}”
2: 192.32.7.8.2
$echo “3: ${ip_[3]}”
3: 192.32.2.3.3
Note:
We recommend that you use the new
mi/jointfilesconvert/95481/bget
command instead of the
instenv
command. The
mi/jointfilesconvert/95481/bget
command accesses MIB tables approximately
50 percent faster than the
instenv
command.
Commenti su questo manuale