Using hwquery, Hwquery command-line syntax, Hwquery command line arguments – HP Linux Server Management Software User Manual
Page 33: Hwquery return codes
Toolkit utilities 33
Expression input
Result
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.
HWQUERY command-line syntax
hwquery [drive:][path]hpdiscoveryfilename
[drive:][path]allboards.xml variable=<string> ...
HWQUERY command line arguments
Command-line argument
Description
[drive:][path]hpdiscoveryfilenam
e
This argument specifies the hardware discovery file used to
run the query.
[drive:][path]allboards.xml
This argument specifies the allboards.xml PCI device list file,
which is used to convert PCI IDs found in hardware discovery
into device names, such as "Smart Array 5i Controller."
variable=
In this argument, variable is the name of an environment
variable and <string> is a PCI device name or the name of an
element from the hardware discovery file. Arguments must be
in quotes if
case-sensitive.
...
You can specify multiple variable=<string> arguments.
HWQUERY return codes
Value
Meaning
0
The command was completed successfully
n
N arguments were ignored because they were not in the variable=