beautypg.com

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

Page 13

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 searches 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 HWQ:SystemName eq "ProLiant BL20p"

if errorlevel 1 goto NEXT1

call .\BL20p.cmd

goto end

:NEXT1

ifhw .\hpdiscovery.xml allboards.xml HWQ: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 RAID 5 ADG
setting. The following example demonstrates how to use IFHW to detect a particular card or device:

REM *** Configure the array controllers by reading the configuration

This manual is related to the following products: