Expression operators and terms, Expression examples, Using hwquery – HP Linux Server Management Software User Manual

Page 29

Advertising
background image

Toolkit utilities 29

Expression operators and terms

Operator or term Result

and

True if both operands are true

or

True if either operand is true

gt

True if the first operand is greater than the second

lt

True if the first operand is less than the second

gte

True if the first operand is greater than or equal to the second

lte

True if the first operand is less than or equal to the second

eq

True if the two operands are equal

neq

True if the two operands are not equal

not

True if the operand is false

PCI:<string>

True if a PCI device whose name includes <string> is found in the hardware discovery
file. <string> is case-sensitive.

HWQ:<string>

The hardware discovery file is searched for <string>, and the corresponding value is

the value of this term. <string> is case-sensitive.

<string>

A literal string, used for comparison

<number>

A literal number, used for comparison

Expression examples

Expression input

Result

"PCI:Smart Array 5i"

True if the Smart Array 5i Controller is found in the

system

HWQ:TotalRAM gte 512

True if the amount of RAM in the hardware

discovery file is at least 512

HWQ:ROMDate neq "11/12/2004"

True if the ROM date in the hardware discovery file

is not 11/12/2004

HWQ:SystemName eq "ProLiant DL380 G2"

True if the system name in the hardware discovery
file exactly matches "ProLiant DL380 G2"

HWQ:SystemName eq "ProLiant DL380 G2" and

"PCI:Smart Array 5i" and HWQ:ROMDate eq

"11/12/2004"

True if the system is a ProLiant DL380 G2 with a

Smart Array 5i Controller present and a ROM date
of 11/12/2004

"PCI:Smart Array 5i" or "PCI:Smart Array

6i"

True if the system contains a Smart Array 5i

Controller or a Smart Array 6i Controller

Using HWQUERY

HWQUERY is used from a script, in conjunction with other utilities, to control the deployment. The

HWQUERY utility enables you to use data from the hardware discovery file in your own scripts. HWQUERY
cannot alter environment variables directly. To set the variable, the output of HWQUERY must be used by the

hosting script. The most common way to use it is to write the output to an intermediate script that is

subsequently called by the hosting script.

Advertising
This manual is related to the following products: