hwquery
Synopsis
hwquery [path]hwdiscfilename [path]allboards.xml variable=string ...
Description
The hwquery utility is executed from a script file, in conjunction with other utilities, to control
the install process. The hwquery utility uses data from the hardware discovery file in your own
scripts. The hwquery utility 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 file that is subsequently called by the hosting script.
Options
Table 5-18 hwquery Options
DescriptionCommand line argument
This argument specifies the hardware discovery file used to run the query.
[path]hwdiscfilename
This argument specifies the allboards.xmlPCI device list file, which is used to convert
PCI IDs found in hardware discovery into device names, such as “Smart Array 6402
Controller.”
[path]allboards.xml
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 string contains spaces. The string name is case-sensitive.
variable=string
You can specify multiple variable=stringarguments....
Examples
• To produce an hwdisc.xml file that contains <RAM>768</RAM>, use the following input
at the command line:
hwquery hwdisc.xml allboards.xml MY_SYS_RAM=RAM
The hwquery utility produces MY_SYS_RAM=768.
• To produce an hwdisc.xml file that indicates a Smart Array 6402 Controller is present, use
the following input at the command line:
hwquery hwdisc.xml allboards.xml "TEST=Smart Array 6402"
The hwquery utility produces TEST=Smart Array 6402 Controller.
• The hwquery utility is case-sensitive.
hwquery hwdisc.xml allboards.xml "TEST=smart array 6402"
This command produces TEST=. This behavior is correct even if counter-intuitive. The string
is case-sensitive and the argument uses lowercase instead of the title case in the
allboards.xml file.
• To produce an hwdisc.xml file that contains <RAM>768</RAM> and
<EFIFw>1.10</EFIFw>, use the following input at the command line:
hwquery hwdisc.xml allboards.xml MYRAM=RAM MYEFIFW=EFIFw
The hwquery utility producesMYRAM=768 and MYEFIFW=1.10.
• If the MYRAM environment variable does not exist, this command creates the variable. To set
the value of the <RAM> tag in hwdisc.xml to the MYRAM environment variable use this
command:
export $( hwquery hwdisc.xml allboards.xml MYRAM=RAM )
96 Utilities Reference