Advanced topics, Overview, Querying the hpdiscovery file based on system name – HP Linux Server Management Software User Manual

Page 13

Advertising
background image

Advanced topics 13

Advanced topics

Overview

The advanced topics addressed in this section cover some of the most common deployment tasks that can

be automated using the Toolkit.

IMPORTANT:

The script files and script segments in this section are provided only as

examples. You must modify the scripts for your environment. When creating or modifying
your own scripts, the pause command is a valuable tool to help you determine that each

step of the script is functioning as desired.

Customizing deployment scripts using
HPDISCOVERY and IFHW

The HPDISCOVERY utility enables you to determine which devices and capabilities are available in a
particular ProLiant server. HPDISCOVERY generates an XML-based output file that provides information

such as system ROM version, amount of RAM available, and the types of devices present in the system.
Then, the HWQUERY and IFHW files can then be used to query the output file, enabling you to add

conditional tests to a script so that it performs different operations based on the outcome of the tests.

Querying the HPDISCOVERY file based on system name

In the following script, the IFHW utility checks the HPDISCOVERY data in the hpdiscovery.xml file for the
system name ProLiant BL20p. If the system name is found, the script calls the bl20p.cmd file.

ifhw .\hpdiscovery.xml allboards.xml HWL:SystemName eq "ProLiant BL20p"

if errorlevel 1 goto NEXT1

call .\BL20p.cmd

goto end

:NEXT1

ifhw .\hpdiscovery.xml allboards.xml HWL:SystemName eq "ProLiant DL380

G4"

if errorlevel 1 goto NEXT2

call .\ DL380G4.cmd

goto end

Querying the HPDISCOVERY file to determine the presence of a

particular card

Using IFHW to detect a particular PCI card or device can be valuable in determining which settings to

apply. For example, an array controller used as a boot controller might require a RAID 1 setting, while an
optional array controller used for a database (such as a Smart Array 5312 Controller) might require a

Advertising
This manual is related to the following products: