subscribe iconSubscribe to this information

lsdev command

Purpose

Displays Virtual I/O Server devices and their characteristics.

Syntax

To list devices:

lsdev [ -type DeviceType... ] [ -virtual ] [ -field FieldName... ] [ -fmt Delimiter ] [-state State ]

To display information about a specific device:

lsdev { -dev DeviceName | -plc PhysicalLocationCode } [ -child ] [ -field FieldName... ] [ -fmt Delimiter ]

lsdev { -dev DeviceName | -plc PhysicalLocationCode } [ -attr [ Attribute ] | -range Attribute | -slot | -vpd | -parent]

lsdev -vpd

lsdev -slots

Description

The lsdev command displays information about devices in the Virtual I/O Server. If no flags are specified, a list of all devices, both physical and virtual, in the Virtual I/O Server is displayed. To list devices, both physical and virtual, of a specific type use the -type DeviceType flag. Use the -virtual flag to list only virtual devices. Combining both the -type and -virtual flags will list the virtual devices of the specified type.

To display information about a specific device, use the -dev DeviceName or -plc PhysicalLocationCode. Use either the -child, -parent, -attr, -range, -slot, or -vpd flag to specify what type of information is displayed. If none of these flags are used, the name, status, and description of the device will be displayed.

Using the -vpd flag, without specifying a device, displays platform-specific information for all devices.

If the -fmt Delimiter flag is specified the lsdev command returns all output in a delimiter separated format. The -state State flag limits the output to devices in the indicated state. The -slots flag produces a list of I/O slot information for built-in adapters that are not hot-pluggable but can have dynamic LPAR operations performed on them.

The lsdev output will be truncated to 80 characters per line, unless the -fmt flag is used. If the -fmt flag is used, the output lines will not be truncated and line wrap may occur, based on what the terminal window line length is set to.

Flags

-attr [Attribute ] Displays information about attributes of a given device. If an attribute is specified, its current value is displayed. If no attribute is specified, the following information is displayed about all attributes for the give device:
attribute
Attribute name
value
Current value of the attribute
description
Description of the attribute
user
Whether attribute can be set by the user (TRUE/FALSE)
-child Displays the name, status, physical location code, and description for each child of the specified device (-dev DeviceName or -plc PhysicalLocationCode).
-dev DeviceName Specifies the device logical name for the device for which information is listed. This flag cannot be used with the -plc flag.
-field FieldName Specifies the list of fields to be displayed. The following fields are supported:
name
Device name
status
Device status
physloc
Physical location code
description
Description of the device
parent
Note: The -field flag cannot be combined with the -parent, -attr, -range, -slot, or -vpd flags.
-fmt Delimiter Specifies a delimiter character to separate output fields.
-parent Displays the name, status, physical location code, and description of the parent device of the given device (-dev DeviceName or -plc PhysicalLocationCode).
-plc PhysicalLocationCode Specifies the device physical location code for the device for which information is listed. This flag cannot be used with the -dev flag.
-range Attribute Displays the allowed values for the specified attribute.
-slot Displays the slot, description, and device name of the specified device (-dev DeviceName or -plc PhysicalLocationCode). The device must be in a PCI hot swappable slot.
-slots Displays a list of I/O slot information for built-in adapters that are not hot-pluggable but can have dynamic LPAR operations performed on them.
-State State Limits the output to devices in the specified state. The following states are supported:
0, defined
Server Virtual Adapter.
1, available
Server Virtual Adapter Physical Location Code
2, stopped
Client Partition ID
-type DeviceType Specifies the device type. This flag can be used to restrict output to devices in the specified types. Both physical and virtual devices are listed.
Supported types are as follows:
adapter
Lists adapters
disk
Lists disks
lv
Lists logical volumes and volume groups
optical
Lists optical devices (cdrom/dvdrom)
tape
Lists tape devices
tape4vtd
Lists tape devices available for creating virtual target devices
tty
Lists tty devices
ent4sea
Lists all physical Ethernet adapters and Etherchannel adapters available for creating a shared Ethernet adapter
ven4sea
Lists all virtual Ethernet adapters available for creating shared Ethernet adapter
ent4ip
Lists all adapters over which interface can be configured.
sea
Lists all shared Ethernet adapters over which the interface can be configured.
-virtual Restricts output to virtual devices only.
-vpd Displays platform-specific information for all devices or for a single device when -dev DeviceName or -plc PhysicalLocationCode are specified.

Exit Status

Table 1. Command specific return codes
Return code Description
12 Specified logical volume belongs to the operating system.
13 Specified physical or logical volume is not valid physical or logical volume

See Exit status for Virtual I/O Server commands.

Examples

  1. To list all virtual adapters and display the name and status fields, type:
    lsdev -type adapter -virtual -field name status
    The system displays a message similar to the following:
    name  status
    
    vhost0  Available
    vhost1  Available
    vhost2  Available
    ent6    Available
    ent7    Available
    ent8    Available
    ent9    Available
  2. To list all devices of type disk and display the name and physical location fields, type:
    lsdev -type disk -field name physloc
    The system displays a message similar to the following:
    name    physloc
    
    hdisk0 U9111.520.10004BA-T15-L5-L0
    hdisk1 U9111.520.10004BA-T15-L8-L0
    hdisk2 U9111.520.10004BA-T16-L5-L0
    hdisk3 U9111.520.10004BA-T16-L8-L0
    hdisk4 UTMP0.02E.00004BA-P1-C4-T1-L8-L0
    hdisk5 UTMP0.02E.00004BA-P1-C4-T2-L8-L0
    hdisk6 UTMP0.02F.00004BA-P1-C8-T2-L8-L0
    hdisk7 UTMP0.02F.00004BA-P1-C4-T2-L8-L0
    hdisk8 UTMP0.02F.00004BA-P1-C4-T2-L11-L0
    vtscsi0 U9111.520.10004BA-V1-C2-L1
    vtscsi1 U9111.520.10004BA-V1-C3-L1
    vtscsi2 U9111.520.10004BA-V1-C3-L2
    vtscsi3 U9111.520.10004BA-V1-C4-L1
    vtscsi4 U9111.520.10004BA-V1-C4-L2
    vtscsi5 U9111.520.10004BA-V1-C5-L1
  3. To display the parent of a devices, type:
    lsdev -dev hdisk0 -parent
    The system displays a message similar to the following:
    parent
    
    scsi0
  4. To display all I/O slots that are not hot-pluggable but can have DLPAR operations performed on them, type:
    lsdev -slots
    The system displays a message similar to the following:
    U787A.001.DNZ00Y1-P1-C1  Logical I/O Slot  pci4 sisscsia0   
    U787A.001.DNZ00Y1-P1-T5  Logical I/O Slot  pci3 ent0 ent1   
    U787A.001.DNZ00Y1-P1-T7  Logical I/O Slot  pci2 usbhc0 usbhc1   
    U9111.520.10DFD8C-V2-C0  Virtual I/O Slot  vsa0   
    U9111.520.10DFD8C-V2-C2  Virtual I/O Slot  vhost0   
    U9111.520.10DFD8C-V2-C4  Virtual I/O Slot  Unknown

Send feedback | Rate this page

Last updated: Fri, Oct 30, 2009