Expression examples, Using hwquery, Hwquery command-line syntax – HP ProLiant DL380 Server User Manual
Page 28: Hwquery command-line arguments, Hwquery return codes
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
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"
True if the system is a ProLiant DL380 G2 with a Smart
Array 5i Controller present and a ROM date of
11/12/2004
HWQ:SystemName eq
"ProLiant DL380 G2" and "PCI:Smart Array
5i" and HWQ:ROMDate eq "11/12/2004"
True if the system contains a Smart Array 5i Controller or
a Smart Array 6i Controller
"PCI:Smart Array 5i" or "PCI:Smart Array
6i"
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 [path]hpdiscoveryfilename [path]allboards.xml variable=<string> ...
HWQUERY command-line arguments
Description
Command-line argument
This argument specifies the hardware discovery file used
to run the query.
[path]hpdiscoveryfilename
This argument specifies the allboards.xml PCI device list
file, which is used to convert PCI IDs found in hardware
[path]allboards.xml
discovery into device names, such as "Smart Array 5i
Controller."
In this argument, variable is the name of an environment
variable and <string> is a PCI device name or the name
variable=
of an element from the hardware discovery file. Arguments
must be in quotes if <string> contains spaces. <string> is
case-sensitive.
You can specify multiple variable=<string> arguments.
...
HWQUERY return codes
Meaning
Value
The command was completed successfully
0
N arguments were ignored because they were not in the
variable=
n
28
Toolkit utilities
- ProLiant BL465c Server Blade ProLiant BL2x220c G5 Server-Blade ProLiant BL2x220c G6 Server-Blade ProLiant SL390s G7 Server ProLiant BL280c G6 Server-Blade ProLiant ML370 Server ProLiant DL360p Gen8 Server ProLiant BL680c G5 Server-Blade ProLiant BL480c Server-Blade ProLiant DL370 G6 Server ProLiant SL230s Gen8 Server ProLiant SL250s Gen8 Server ProLiant SL335s G7 Server ProLiant BL260c G5 Server-Blade ProLiant DL365 G5 Server ProLiant BL490c G6 Server-Blade ProLiant BL460c Gen8 Server Blade ProLiant ML350 Server ProLiant DL160 Gen8 Server ProLiant DL585 Server ProLiant BL620c G7 Server-Blade ProLiant ML330 G6 Server ProLiant BL685c Server-Blade ProLiant DL320 Server ProLiant BL680c G7 Server-Blade Intelligent Provisioning ProLiant DL120 G7 Server ProLiant BL495c G6 Server-Blade ProLiant DL580 Server ProLiant DL380p Gen8 Server ProLiant BL2x220c G7 Server-Blade ProLiant DL785 G6 Server ProLiant BL460c Server-Blade ProLiant BL495c G5 Server-Blade ProLiant BL490c G7 Server-Blade ProLiant DL360 Server ProLiant ML310 G5 Server ProLiant DL385 Server ProLiant DL785 G5 Server ProLiant ML350p Gen8 Server