[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

lsresource Command

Purpose

Displays bus resources for available devices in the system and recommends attribute values for bus resource resolution.

Syntax

lsresource -a |  -r ] [ -d ] -l  Name

Description

The lsresource command writes a list of assigned bus resources to standard out, or determines if the bus resources for devices resolve.

The lsresource command lets you display the currently assigned values for the bus resource attributes for the device specified by the given device logical name (-l Name). Use the -a flag to display the currently assigned values for all bus resource attributes for all devices under the same parent bus as the specified device.

Use the -r flag to determine if the bus resources for the specified device are resolvable. In this case, the lsresource command checks all devices under the same parent bus as the specified device, including defined but not available devices, to see if their bus resource attributes are resolvable. The lsresource command produces no output if all attributes resolve. The lsresource command provides information depending on the type of conflict detected if any device's bus resources are unresolvable. In some cases, the lsresource command can provide you with information that leads to the resolution of the conflict.

The lsresource command identifies the device name, attribute name, and a suggested value for the attribute if a conflict results from an attribute that only a user can change. Setting the attribute to the suggested value should resolve the conflict. This may aid in the configuration of devices with attributes that can only a user can change. Such devices include adapter cards which use jumpers or switches on the card to select values.

In some cases, a conflict may be due to an attribute which the system can normally adjust at boot time but is prevented from doing so at run time because the device is in the Available state. In these situations, the lsresource command will indicate that the configuration will be resolved by rebooting the system.

It is possible that multiple user changeable attributes will be identified when unresolvable conflicts occur. These may be for the device specified by the given device logical name (-l Name) or for other devices in the system. All of the identified attributes will need to be changed to resolve the conflict. It may even be the case where user changeable attributes are identified and a reboot is indicated. In this case, all of the identified attributes will need to be changed and the system rebooted to resolve the conflicts.

Finally, lsresource may determine that the set of devices currently defined in the devices configuration database can not be resolved regardless of attributes being changed or the system rebooted. In this case, a list of the devices which could not be resolved is written to standard out. If the problem has resulted from a new device just being defined, that device should be removed, or the devices listed by lsresource should be removed. If the problem is not resolved by removing devices, there could be additional problems on the next reboot. This is because the order in which devices are resolved at boot time may differ from the order they are resolved by lsresource, resulting in a different set of unresolvable devices at boot time. If the set of unresolvable devices at boot time should now include a device needed for booting, problems such as no console being configured or the system failing to boot could occur.

The following applies when lsresource is used to list currently assigned bus resource values (the -r flag is not specified).

The TYPE field in the output listing contains the following symbols:

B Bus Memory Address Values
M Bus Memory Address Values
O I/O Address Values
I Bus Interrupt Levels
N Non-sharable Bus Interrupt Levels
A DMA Arbitration Level

The S column denotes shared attributes. These are attributes which are required to be set to the same value. They are grouped by the number specified in the column. All attributes with a 1 by them must be set to the same value, all attributes with a 2 by them must be set to the same value, and so on. In some cases, two or more interrupt attributes may be set to the same value but have no numbers in the S column indicating that they are shared. This is because the values are not required to be the same but just happen to be set to the same value because they could not be assigned their own unique values.

The G column denotes attributes in a group. These are a set of attributes whose values depend on each other. If one is changed to the next possible value, the rest of the attributes in the group must also be changed to the next possible value. Their groupings are indicated by the number specified in the column. All attributes with a 1 by them are in the same group, all attributes with a 2 by them are same group, and so on.

On some models, the interrupt value displayed may be followed by a value enclosed in parenthesis. This is not part of the interrupt value but serves to identify the interrupt controller to which the interrupt is associated. The identifier consists of a letter followed by a number, such as A0 . The letter indicates the type of interrupt controller and the number distinguishes between multiple instances of that type of controller. There are two types of interrupt controllers that may be identified:

A Indicates an AT interrupt controller.
B Indicates a non-AT interrupt controller.

Flags

-a Specifies that all allocated bus resource attributes for all devices connected to the same top parent bus as the device specified with the -l flag are to be displayed. This flag cannot be used with the -r flag.
-d Specifies that the attribute text descriptions are to be included in the output.
-l Name (Lowercase L) Specifies the logical name of the device attributes to display.
-r Specifies to attempt to resolve all bus resources of all devices connected to the same top parent bus as the device specified with the -l flag. This will include all devices that are in the DEFINED state. The lsresource command will display any conflicts and advise the user on changeable values. No changes to the ODM database are made. This flag cannot be used with the -a flag.

Security

Access Control: Any User

Auditing Events: N/A

Examples

  1. To list bus attributes for the token ring device, enter:
    lsresource -l tok0
    The system displays a message similar to the following:
    TYPE   DEVICE         ATTRIBUTE       S G CURRENT VALUE
    ----- --------------  --------------- - - ----------------------
    M     tok0            dma_bus_mem         0x003b2000 - 0x003f1fff
    O     tok0            bus_io_addr         0x000086a0 - 0x000086af
    N     tok0            bus_intr_lvl                  3
    A     tok0            dma_lvl                       7
  2. To list bus attributes for all devices, enter:
    lsresource -a -l tok0
    The system displays a message similar to the following:
    TYPE  DEVICE          ATTRIBUTE          S G   CURRENT VALUE
    ----- --------------  ---------------    - -    -----------------------
    M      bus0            bus_iocc_mem             0x00fffff0 - 0x00ffffff
    M      gda0            vram_start        1      0x00400000 - 0x007fffff
    M      gda0            bus_mem_start            0x000c0000 - 0x000c1fff
    M      gda0            dma1_start               0x00800000 - 0x009fffff
    M      gda0            dma2_start               0x00a00000 - 0x00bfffff
    M      gda0            dma3_start               0x00c00000 - 0x00dfffff
    M      gda0            dma4_start               0x01000000 - 0x011fffff
    M      scsi0           bus_mem_addr             0x000e0000 - 0x000e0fff
    M      scsi0           dma_bus_mem              0x00100000 - 0x00301fff
    M      tok0            dma_bus_mem              0x003b2000 - 0x003f1fff
    O      da0             bus_io_addr              0x00000060 - 0x0000006f
    O      siokta0         bus_io_addr              0x00000050 - 0x00000051
    O      sioma0          bus_io_addr              0x00000048 - 0x00000049
    O      ppa0            bus_io_addr              0x00000078 - 0x0000007a
    O      gda0            bus_addr_start    1      0x00002110 - 0x0000211f
    O      tok0            bus_io_addr              0x000086a0 - 0x000086af
    I      siokta0         bus_intr_lvl                        1   (A0)
    I      sioma0          bus_intr_lvl                        1   (A0)
    I      ppa0            bus_intr_lvl                       13   (A0)
    I      gda0            int_level                           9   (A0)
    I      scsi0           bus_intr_lvl                       14   (A0)
    N      fda0            bus_intr_lvl                        6   (A0)
    N      tok0            bus_intr_lvl                        3   (A0)
    A      fda0            dma_lvl                             0
    A      gda0            dma_channel                         3
    A      scsi0           dma_lvl                             4
    A      tok0            dma_lvl                             7
  3. To report the outcome of a resolution of device attributes, enter:
    lsresource -r - d -l tok0
    Depending on the outcome of the resolution, different messages may be displayed. The output below signifies to a user that the resolution can be successful if changes are made, i.e., the attributes are changed to the suggested values.
    lsresource: The attribute(s) for some device(s) in the system could
    not be resolved.  To resolve conflicts, attribute(s) need to be
    modified.  A suggested value for each attribute is provided.
       
    DEVICE          ATTRIBUTE        CURRENT   SUGGESTED  DESCRIPTION
    --------------  ---------------  -------   ---------  -----------
    ent1            bus_intr_lvl     11        5          Bus interrupt level
    ent1            bus_mem_addr     0xc0000   0xc4000    Bus memory address
    ent1            bus_io_addr      0x300     0x320      Bus I/O address
    ent2            bus_intr_lvl     11        7          Bus interrupt level
    ent2            bus_mem_addr     0xc0000   0xc8000    Bus memory address

Files

/usr/sbin/lsresource Contains the lsresource command.

[ Previous | Next | Contents | Glossary | Home | Search ]