Visara Master Console Center Scripting Guide Instrukcja Użytkownika Strona 184

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 262
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 183
Chapter 5 Script Commands
Scripting Guide 184
SNMP_GET
Syntax:
SNMP_GET( $Alias, $MIBOID) ==> $Value
Description:
Retrieves the value of a specified MIB object.
Action:
The value of the object specified by the MIBOID parameter in the MIB
of the Alias is returned as a string.
Parameters:
$Alias. String expression. The NMS alias from which to get the MIB
object value. The specified alias must not be a group alias. Refer to
NMS Alias on page 31 for more information.
$MIBOID. String expression. The MIB Object ID to get the value for.
Refer to MIB OID on page 31 for more information.
Returns:
String value, as follows:
Value Meaning
“” (null string) The MIB object does not exist.
Any other value The value of the MIB object.
Notes:
1. Append “.0” to the MIB Name. Alternatively, use the
SNMP_GET() command to enter a branch of the MIB, and the
SNMP_GETNEXT() command to retrieve specific values from that
branch.
2. For error checking of SNMP_GET(), refer to the description of the
ERRORNUM() command.
Example:
//This sample code enters the sysName branch and grabs
// the value of sysName.
//Note that the alias must be defined in SNMP Setup.
$Alias := “RS6000”
$MIBOID := “sysName”
$RetVal := SNMP_GET( $Alias, $MIBOID)
$SystemName := SNMP_GETNEXT( $Alias, $MIBOID,
$NextMIBOID)
//$SystemName now contains the value of sysName.
//Example2
//This gets the value of sysName by appending a “.0”
// to the end of the branch name.
$Alias := “RS6000”
$MIBOID := “sysName”
$MIBOIDValue := $MIBOID + “.0”
$SystemName := SNMP_GET( $Alias, $MIBOIDValue)
//$SystemName now contains the value of sysName.
See Also:
SNMP_GETNEXT, SNMP_GETTABLE, SNMP_SET, SNMP_TRAPSEND
Przeglądanie stron 183
1 2 ... 179 180 181 182 183 184 185 186 187 188 189 ... 261 262

Komentarze do niniejszej Instrukcji

Brak uwag