lsparent Command

Purpose

Displays the possible parent devices that accept a specified connection type or device.

Syntax

lsparent { -C | -P } { -k ChildConnectionKey | -l ChildName } [ -f File ] [ -FFormat] [ -h ] [ -H]

Description

The lsparent command lists devices from the Device Configuration database that can accept a given device as a child device, specified by the -l ChildName flag, or a given type of child device connection, specified by the -k ChildConnectionKey flag.

You can display the default output one of the following ways.
  • Use the -C flag to display the default output information for a device from the Customized Devices object class, which is name, state, location, and description.
  • Use the -P flag to display the default output information for a device from the Predefined Devices object class, which is class, type, subclass, and description.
To override these two default outputs, you can use the -F Format flag to display the output as designated by a user-formatted string. The Format parameter is a quoted list of column names separated and possibly terminated by nonalphanumeric characters.

You can supply the flags either on the command line or from the specified File parameter using the -f flag.

Flags

Item Description
-C Lists information about a device that is in the Customized Devices object class. The information displayed can be from both the Customized and Predefined Devices object classes. This flag cannot be used with the -P flag.
-f File Reads the necessary flags from the File variable.
-F Format Displays the output in a user-specified format, where the Format variable is a quoted list of column names from the Predefined Devices object class or the Customized Devices object class separated and possibly terminated by non-alphanumeric characters. If white space is used as the separator, the lsparent command displays the output in aligned columns. In addition to the column names in the two object classes, the special name description can be used to display a text description of the device.
-H Displays headers above the column output.
-h Displays the command usage message.
-k ChildConnectionKey Specifies the connection key that identifies the device subclass name of the child device. This flag cannot be used with the -l flag.
-l ChildName Specifies the logical name of a possible child device. This flag cannot be used with the -k flag.
-P Lists information about a device that is in the Predefined Devices object class. The information displayed can be from both the Customized and Predefined Devices object classes. This flag cannot be used with the -C flag.

Examples

  1. To list possible parent devices in the Customized Devices object class that accept an RS-232 device, type the following:
    lsparent -C -k rs232
    The system displays a message similar to the following:
    sa0 Available 01-S1 Standard I/O Serial Port
    sa1 Available 01-S2 Standard I/O Serial Port
    sa2 Available 10-68 IBM 8-Port EIA-232/RS-422A (PCI) Adapter
    sa3 Available 10-70 IBM 8-Port EIA-232/RS-422A (PCI) Adapter
    sa4 Available 10-78 IBM 8-Port EIA-232/RS-422A (PCI) Adapter
    sa5 Available 20-58 IBM 8-Port EIA-232/RS-422A (PCI) Adapter
  2. To list possible types of parent devices in the Predefined Devices object class that accept an RS-232 device, type the following:
    lsparent -P -k rs232
    The system displays a message similar to the following:
    adapter      pnp501   isa_sio  Standard I/O Serial Port
    adapter      4f111100 pci      IBM 8-Port EIA-232/RS-422A (PCI) Adapter
    concentrator 16c232   sync_pci 16-Port RAN EIA-232 for 128-Port Adapter
    concentrator 16e232   sync_pci 16-Port Enhanced RAN EIA-232 for 128-Port Adapter
  3. To list possible parent devices in the Customized Devices object class that accept the rmt0 tape device as a child device, type the following:
    lsparent -C -l rmt0
    The system displays a message similar to the following:
    scsi2 Available 20-60 Wide/Ultra-2 SCSI I/O Controller
    scsi3 Available 20-61 Wide/Ultra-2 SCSI I/O Controller
    scsi1 Available 10-88 Wide/Ultra-2 SCSI I/O Controller
    scsi0 Available 10-60 Wide/Fast-20 SCSI I/O Controller
  4. To list possible types of parent devices in the Predefined Devices object class that accept the rmt0 tape device as a child device, type the following:
    lsparent -P -l rmt0
    The system displays a message similar to the following:
    adapter sym896 pci Wide/Ultra-2 SCSI I/O Controller
    adapter sym895 pci Wide/Ultra-2 SCSI I/O Controller
    adapter sym875 pci Wide/Fast-20 SCSI I/O Controller

Files

Item Description
/usr/sbin/lsparent Contains the lsparent command.