Hwquery command-line syntax, Hwquery command-line arguments, Hwquery return codes – HP Linux Server Management Software User Manual

Page 30: Hwquery command-line examples

Advertising
background image

Toolkit utilities 30

HWQUERY command-line syntax

hwquery [path]hpdiscoveryfilename [path]allboards.xml variable=<string>

...

HWQUERY 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."

variable=<string>

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. <string> is

case-sensitive.

...

You can specify multiple variable=<string> arguments.

HWQUERY return codes

Value

Meaning

0

The command was completed successfully

n

N arguments were ignored because they were not in the variable=<string> format.

HWQUERY command-line examples

Command-line argument

Description

hwquery hpdiscovery.xml allboards.xml

MY_SYS_RAM=TotalRAM

For a hpdiscovery.xml file that contains

<TotalRAM>768</TotalRAM>, HWQUERY
produces the following:

MY_SYS_RAM=768

hwquery hpdiscovery.xml allboards.xml

"TEST=Smart Array"

For a hpdiscovery.xml file that indicates a Smart

Array 5i Controller is present, HWQUERY

produces the following:

TEST=Smart Array 5i Controller

hwquery hpdiscovery.xml allboards.xml

MYRAM=TotalRAM MYROMDATE=ROMDate

For a hpdiscovery.xml file that contains
<TotalRAM>768</TotalRAM> and

<ROMDate>11/15/2002</ROMDate>,

HWQUERY produces the following:

MYRAM=768

MYROMDATE=11/15/2002

hwquery hpdiscovery.xml allboards.xml

"TEST=smart array 5i"

Although the controller is present, HWQUERY
produces the following:

TEST=

This behavior is correct. The string is case-sensitive,

and the argument uses lowercase lettering instead

of the uppercase found in the allboards.xml file.

Advertising
This manual is related to the following products: