Hpdiscovery command-line examples, Using ifhw, Ifhw command-line syntax – HP Linux Server Management Software User Manual
Page 28: Ifhw command-line arguments, Ifhw return codes, Ifhw command-line examples
Toolkit utilities 28
HPDISCOVERY command-line examples
Command-line argument
Description
hpdiscovery -f
/toolkit/hpdiscovery.xml
This command generates the file hpdiscovery.xml in the
/toolkit directory.
Using IFHW
IFHW is used from a script file, in conjunction with other utilities, to control the deployment. The IFHW utility
enables you to make intelligent queries against the hardware discovery file. Queries take the form of a
logical expression, and the result of the expression is returned as the return code of the tool, which the hosting
script can use to conditionally perform actions.
IFHW command-line syntax
ifhw [path]hpdiscoveryfilename [path]allboards.xml <expression>
IFHW command-line arguments
Command-line argument
Description
[path]hpdiscoveryfilename
This argument specifies the hardware discovery file used to
run the query.
[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."
This argument specifies the query expression. See
"Expression operators and terms (on page
)."
IFHW return codes
Value
Meaning
0
The expression is true.
1
The expression is false.
2
The expression was not understood or an argument was invalid.
IFHW command-line examples
Command-line argument
Description
ifhw hpdiscovery.xml allboards.xml
"PCI:Smart Array 5i"
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