HP ProLiant SL4545 HP Scripting Toolkit 9.30 for Windows User Guide - Page 22

IFHW command line examples, Expression operators and terms, Expression examples

Page 22 highlights

IFHW command line examples Command-line argument ifhw hpdiscovery.xml allboards.xml "PCI:Smart Array 5i" Description This command returns the following error levels: • ERRORLEVEL 0 (True) if the Smart Array 5i is present • ERRORLEVEL 1 (False) if the device is not present • ERRORLEVEL 2 (Error) if the expression could not be understood Expression operators and terms Operator or term and or gt lt gte lte eq neq not PCI: HWQ: Result True if both operands are true True if either operand is true True if the first operand is greater than the second True if the first operand is less than the second True if the first operand is greater than or equal to the second True if the first operand is less than or equal to the second True if the two operands are equal True if the two operands are not equal True if the operand is false True if a PCI device whose name includes is found in the hardware discovery file. is case-sensitive. The hardware discovery file is searched for , and the corresponding value is the value of this term. is case-sensitive. A literal string, used for comparison A literal number, used for comparison Expression examples Expression input "PCI:Smart Array 5i" HWQ:TotalRAM gte 512 HWQ:ROMDate neq "11/12/2004" HWQ:SystemName eq "ProLiant DL380 G2" Result True if the Smart Array 5i Controller is found in the system True if the amount of RAM in the hardware discovery file is at least 512 MB True if the ROM date in the hardware discovery file is not 11/12/2004 True if the system name in the hardware discovery file exactly matches "ProLiant DL380 G2" 22 Scripting Toolkit utilities

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62

IFHW command line examples
Description
Command-line argument
This command returns the following error levels:
ifhw hpdiscovery.xml allboards.xml
"PCI:Smart Array 5i"
ERRORLEVEL 0 (True) if the Smart Array 5i is present
ERRORLEVEL 1 (False) if the device is not present
ERRORLEVEL 2 (Error) if the expression could not be
understood
Expression operators and terms
Result
Operator or term
True if both operands are true
and
True if either operand is true
or
True if the first operand is greater than the second
gt
True if the first operand is less than the second
lt
True if the first operand is greater than or equal to the second
gte
True if the first operand is less than or equal to the second
lte
True if the two operands are equal
eq
True if the two operands are not equal
neq
True if the operand is false
not
True if a PCI device whose name includes <
string
> is found in the hardware discovery file.
<
string
> is case-sensitive.
PCI:
<string
>
The hardware discovery file is searched for <
string
>, and the corresponding value is the value
of this term. <
string
> is case-sensitive.
HWQ:
<string
>
A literal string, used for comparison
<string>
A literal number, used for comparison
<number>
Expression examples
Result
Expression input
True if the Smart Array 5i Controller is found in the system
"PCI:Smart Array 5i"
True if the amount of RAM in the hardware discovery file
is at least 512 MB
HWQ:TotalRAM gte 512
True if the ROM date in the hardware discovery file is not
11/12/2004
HWQ:ROMDate neq
"11/12/2004"
True if the system name in the hardware discovery file
exactly matches "ProLiant DL380 G2"
HWQ:SystemName eq
"ProLiant DL380 G2"
22
Scripting Toolkit utilities