HARDWARE_RESOURCE_INFO view
The HARDWARE_RESOURCE_INFO view returns information about configured hardware resources.
The information returned is similar to the detail available through the STRSST Hardware Service Manager interface and from the Retrieve Hardware Resource List (QGYRHRL, QgyRtvHdwRscList) and Retrieve Hardware Resource Information (QGYRHRI, QgyRtvHdwRscInfo) APIs.
Authorization: None required.
The following table describes the columns in the view. The system name is HW_INFO. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ID | ID | INTEGER | A generated unique identifier for this row in the result set. | ||||||||||||||||
PARENT_ID | PARENT_ID | INTEGER Nullable
|
The ID of the parent to this resource. Contains the null value if this resource is not a child of another resource. |
||||||||||||||||
RESOURCE_CATEGORY | CATEGORY | VARCHAR(11) | The hardware resource category of the resource for which
information is returned.
|
||||||||||||||||
RESOURCE_NAME | RESOURCE | VARCHAR(10) | The name of the resource. | ||||||||||||||||
STATUS | STATUS | VARCHAR(12) Nullable
|
Whether the resource is operational.
Contains the null value if STATUS does not apply to this resource or could not be determined. |
||||||||||||||||
EXTENDED_STATUS | EXT_STATUS | VARCHAR(14) Nullable
|
The extended hardware status of the resource.
Contains the null value if STATUS does not apply to this resource or could not be determined. |
||||||||||||||||
DEVICE_TYPE | DEV_TYPE | VARCHAR(4) Nullable
|
An identifier that represents the object type of this resource.
For self-configuring tape devices, this represents the emulated device type number. A value of *TAP indicates that a self-configuring tape device is emulating a device type that contains characters outside the range of 0 to 9 and A to Z. Contains the null value if a value is not available. |
||||||||||||||||
DEVICE_MODEL | DEV_MODEL | VARCHAR(3) Nullable
|
The model number of the resource. For self-configuring tape
devices, this represents the emulated device model number. Contains the null value if a value is not available. |
||||||||||||||||
ADAPTER_SYSTEM | ADAPT_SYS | VARCHAR(8) Nullable
|
The system to which the coupled system adapter is
connected. Contains the null value if a value is not available. |
||||||||||||||||
LAN_ADAPTER_ADDRESS | LAN_ADAPT | VARCHAR(12) Nullable
|
The network address of the LAN adapter resource. Contains the null value if a value is not available. |
||||||||||||||||
LINE_TYPE | LINE_TYPE | VARCHAR(5) Nullable
|
The line type of the LAN resource.
Contains the null value if the resource has no line type. |
||||||||||||||||
TEXT_DESCRIPTION | TEXT | VARCHAR(50) Nullable
|
The description of the resource. Contains the null value if there is no descriptive text. |
||||||||||||||||
MESSAGE_ID | MESSAGE_ID | CHAR(7) Nullable
|
The message from which TEXT_DESCRIPTION is obtained. This message
is in the QCPFMSG message file in *LIBL. Contains the null value if there is no descriptive text. |
||||||||||||||||
RESOURCE_KIND | KIND | BINARY(24) | The resource kind field consists of 24 bytes of hexadecimal numbers. It can be divided into three 8-byte fields called Kind 1, Kind 2, and Kind 3. The system uses Kind 1, Kind 2, and Kind 3 to categorize the resource. | ||||||||||||||||
RESOURCE_KIND1 | KIND1 | BINARY(8) | The value for Kind 1. | ||||||||||||||||
RESOURCE_KIND2 | KIND2 | BINARY(8) | The value for Kind 2. | ||||||||||||||||
RESOURCE_KIND3 | KIND3 | BINARY(8) | The value for Kind 3. | ||||||||||||||||
SERIAL_NUMBER | SERIAL_NBR | VARCHAR(15) | The expanded unique number based on the manufacturing sequence for the resource. | ||||||||||||||||
SERIAL_NUMBER_SHORT | SHORT_SN | VARCHAR(10) | A unique number based on the manufacturing sequence for the resource. | ||||||||||||||||
PART_NUMBER | PART | VARCHAR(12) Nullable
|
A manufacturing identifier that represents similar types of
hardware. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
BUS_NUMBER | BUS_NBR | INTEGER Nullable
|
A numerical representation of the path connection of the system
processor to the card. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
BOARD_NUMBER | BOARD_NBR | INTEGER Nullable
|
A numerical representation of a section of the bus into which the
card is plugged. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
CARD_NUMBER | CARD_NBR | INTEGER Nullable
|
A numerical representation of the location of the card on the bus.
Contains the null value if the column does not apply to the resource. |
||||||||||||||||
CARD_POSITION | CARD_POS | VARCHAR(5) Nullable
|
The physical location where the device or feature is plugged into
the bus. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
FRAME_ID | FRAME | VARCHAR(4) Nullable
|
The identifier of a frame resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
LOCATION_CODE | LOC_CODE | VARCHAR(79) Nullable
|
The physical location of the hardware resource in the system.
The location code field is a sequence of 0 or more location labels that when followed in order,
lead to the resource location. This is the place someone could go to view, remove, or replace the
piece of hardware. Location labels are etched, silk screened, or marked in other ways on hardware.
The following location labels might be shown in the location code field (n represents a numerical or
alphabetical identifier):
|
||||||||||||||||
LOCATION_CODE (continued) |
Following are the descriptions of the location labels:
This column is available only if the system supports the location code format and if the value applies for the resource Otherwise the null value is returned. |
||||||||||||||||||
IO_BUS_ADDRESS | IOBUS_ADDR | INTEGER Nullable
|
The I/O bus address of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
ADAPTER_ADDRESS | ADAPT_ADDR | INTEGER Nullable
|
The adapter address of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
DEVICE_ADDRESS | DEV_ADDR | INTEGER Nullable
|
The device address of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
DEVICE_POSITION | DEVICE_POS | VARCHAR(5) Nullable
|
The relative device position of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
CONTROLLER_ADDRESS | CON_ADDR | INTEGER Nullable
|
The controller address of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
SYSTEM_PROCESSOR_
FEATURE_CODE |
SYSPROC_FC | CHAR(4) Nullable
|
The processor feature code level of the system. A value is returned
for this column only if the RESOURCE_KIND3 value of the hardware resource indicates that the
resource provides system information (X'0000000000080000'). Contains the null value if the column does not apply to the resource. |
||||||||||||||||
PROCESSOR_FEATURE_CODE | PROC_FC | CHAR(4) Nullable
|
The processor feature, which corresponds to the processor capacity
of the system. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
INTERACTIVE_FEATURE_CODE | INTER_FC | CHAR(4) Nullable
|
The interactive feature of the system. This feature defines the
portion of the processor that can be used to perform interactive work. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
SHARED_SESSION_NUMBER | SHARED_SES | INTEGER Nullable
|
The shared session number of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
PORT_NUMBER | PORT | INTEGER Nullable
|
The port number of the resource. Contains the null value if the column does not apply to the resource. |
||||||||||||||||
LAN_SPEED | LAN_SPEED | VARCHAR(12) Nullable
|
The LAN speed for communications ports.
Contains the null value if the column does not apply to the resource. |
||||||||||||||||
LINK_AGGREGATION | LINK_AGGR | VARCHAR(3) Nullable
|
Whether ports can be aggregated to compose an aggregate link.
Contains the null value if the column does not apply to the resource. |
||||||||||||||||
DEFAULT_MAC_ADDRESS | MAC_ADDR | BINARY(6) Nullable
|
The default MAC address of a LAN port. Contains the null value if the column does not apply to the resource. |
Examples
- List all resources that are not
operational.
SELECT RESOURCE_NAME, STATUS, EXTENDED_STATUS FROM QSYS2.HARDWARE_RESOURCE_INFO WHERE STATUS <> 'OPERATIONAL';
- Return a list of all resources and their children. For each parent device (those with a
PARENT_ID value that is null), it recursively finds all the children that are under the parent. In
addition to some basic resource information and the ID values for the parent and child, the query
returns the nesting depth of the each row and a list of all the device numbers that form the path to
that
row.
SELECT TEXT_DESCRIPTION, RESOURCE_CATEGORY, RESOURCE_NAME, ID, PARENT_ID AS PART_OF, LEVEL, SYS_CONNECT_BY_PATH (VARCHAR(ID), ' ') AS RESOURCE_PATH FROM QSYS2.HARDWARE_RESOURCE_INFO START WITH ID IN (SELECT ID FROM QSYS2.HARDWARE_RESOURCE_INFO WHERE PARENT_ID IS NULL) CONNECT BY PRIOR ID = PARENT_ID;