Displays devices in the system and their characteristics.
lsdev [ -C ][ -c Class ] [ -s Subclass ] [ -t Type ] [ -f File ] [ -F Format | -r ColumnName ] [ -h ] [ -H ] [ -l { Name | - } ] [ -p Parent ] [ -S State ]
lsdev -P [ -c Class ] [ -s Subclass ] [ -t Type ] [ -f File ] [ -F Format | -r ColumnName ] [ -h ] [ -H ]
The lsdev command displays information about devices in the Device Configuration database. You can display information about all devices in the Customized Devices object class using the -C flag. Any combination of the -c Class, -s Subclass, -t Type, -l Name, -p Parent, and -S State flags selects a subset of the customized devices. You can display information about all devices in the Predefined Devices object class using the -P flag. Any combination of the -c Class, -s Subclass, and -t Type flags selects a subset of the predefined devices.
You can display the default output one of two ways. You can either display the default output from the Customized Devices object class using the -C flag, or display the default output from the Predefined Devices object class using the -P flag. To override these two default outputs, you can use the -F Format flag. The -F Format flag displays the output in a user-specified format where the Format parameter is a quoted list of column names separated and possibly ended by nonalphanumeric characters or white space.
The -r ColumnName flag displays the range of values for a particular column over the specified set of devices.
Note that the lsdev command only shows information about devices based upon information in the Customized Devices (Cudv) object class or the Predefined Devices (PdDv) object class. Other object classes (such as the Customized Path (CuPath) object class) are not examined. This situation means that there may be conditions where a device may not be displayed. For example, if the -p Parent flag is used, but the parent identified in the Customized Devices object for a device does not match the Parent specified through the -p flag, the device will not be displayed. However, the device may have a path to the given Parent that is defined in the Customized Paths object class. The lspath command should be used to show all MPIO capable child devices of the given parent.
You can use the Devices application in Web-based System Manager to change device characteristics. You could also use the System Management Interface Tool (SMIT) smit lsdev fast path to run this command.
| -C | Lists information about a device that is in the Customized Devices object class. The default information displayed is name, status, location, and description. The -C flag is not required. It is maintained for compatibility reasons. The -C flag cannot be specified with the -P flag. If neither are specified, the lsdev command behaves as if the -C flag were specified. |
| -c Class | Specifies a device class name. This flag can be used to restrict output to devices in a specified class. |
| -f File | Reads the needed flags from the File parameter. |
| -F Format | Displays the output in a user-specified format, where the Format parameter is a quoted list of column names from the Predefined
or Customized Devices object class, separated and possibly ended by nonalphanumeric
characters or white space. Using white space as the separator, the lsdev command displays the output in aligned columns.
If you specify the -F Format flag with the -C flag, you can specify column names from both the Customized and Predefined Devices object classes. If you specify the -F Format flag with the -P flag, you can only specify column names from the Predefined Devices object class. In addition to the column names, the special purpose name description can be used to obtain a display of device descriptions. This flag cannot be used with the -r ColumnName flag. Also, the physloc special purpose name can be used to display a device's physical location code. |
| -H | Displays headers above the column output. |
| -h | Displays the command usage message. |
| -l Name | Specifies the device logical name from the Customized Devices object class for the device for which information is listed. The Name argument to the -l flag may contain the same wildcard characters that can be used with the odmget command. If the Name argument is a dash, names will be read from STDIN. Names on STDIN must be separated by a comma, a tab, a space, or a "newline" character. The names cannot contain wildcard characters. This flag cannot be used with the -P flag. |
| -p Parent | Specifies the device logical name from the Customized Devices object class for the parent of devices to be displayed. The -p Parent flag can be used to show the child devices of the given Parent. The Parent argument to the -p flag may contain the same wildcard charcters that can be used with the odmget command. This flag cannot be used with the -P flag. |
| -P | Lists information about a device that is in the Predefined Devices object class. The default information displayed is class, type, subclass, description. This flag cannot be used with the -C, -l, or -S flags. |
| -r ColumnName | Displays the set of values in a column. For example, the ColumnName parameter takes the value of the Class parameter to list all the classes. If you specify the -r ColumnName flag with the -C flag, you can specify column names from both the Customized and Predefined Devices object classes. If you specify the -r ColumnName flag with the -P flag, you can only specify column names from the Predefined Devices object class. This flag cannot be used with the -F Format flag. |
| -S State | Lists all devices in a specified state as named by the State parameter. This flag cannot be used with the -P flag. The State parameter can either be a value of d, D, 0 or defined for the Defined state; a, A, 1, or available for the Available state; or s, S, 2, or stopped for the Stopped state. This flag can be used to restrict output to devices in a specified state. |
| -s Subclass | Specifies a device subclass name. This flag can be used to restrict output to devices in a specified subclass. |
| -t Type | Specifies a device type name. This flag can be used to restrict output to devices of a specified type. |
lsdev -P -HThe system displays a message similar to the following:
class type subclass description logical_volume vgtype vgsubclass Volume group logical_volume lvtype lvsubclass Logical volume lvm lvdd lvm LVM Device Driver posix_aio posix_aio node Posix Asynchronous I/O aio aio node Asynchronous I/O (Legacy) pty pty pty Asynchronous Pseudo-Terminal mouse 030102 usbif USB mouse keyboard 030101 usbif USB keyboard driver tmssar node Target Mode SSA Router tmssa tmssa tmssar Target Mode SSA Device disk hdisk ssar SSA Logical Disk Drive pdisk 1000mbC ssar 1GB SSA C Physical Disk Drive pdisk 2000mbC ssar 2GB SSA C Physical Disk Drive . . . disk 540mb2 scsi 540 MB SCSI Disk Drive disk 540mb3 scsi 540 MB SCSI Disk Drive disk 540mb4 scsi 540 MB SCSI Disk Drive disk 540mb5 scsi 540 MB SCSI Disk Drive disk 730mb2 scsi 730 MB SCSI Disk Drive disk 810mb scsi 810 MB SCSI Disk Drive disk 810mb2 scsi 810 MB SCSI Disk Drive bus pcic pci PCI Bus bus isac pci ISA Bus adapter df1000f9 pci FC Adapter adapter df1000f7 pci FC Adapter driver efscsi iocb FC SCSI I/O Controller Protocol Device adapter c1110358 pci USB OHCI Adapter (c1110358) adapter ad100501 pci ATA/IDE Controller Device adapter 4f111100 pci IBM 8-Port EIA-232/RS-422A (PCI) Adapter adapter ccm pci Name of the Common Character Mode device driver driver hdlc 331121b9 IBM HDLC Network Device Driver adapter 331121b9 pci IBM 2-Port Multiprotocol Adapter (331121b9) adapter 2b102005 pci GXT130P Graphics Adapter adapter 2b101a05 pci GXT120P Graphics Adapter adapter 23100020 pci IBM 10/100 Mbps Ethernet PCI Adapter (23100020) . . . if tr TR Token Ring Network Interface if vi VI Virtual IP Address Network Interface if xt XT X.25 Network Interface tcpip inet TCPIP Internet Network Extension swap paging nfs NFS Swap DEVICE drawer media1 media SCSI Device Drawer drawer scsi1 dasd SCSI DASD Drawer adapter 4f111b00 pci IBM 128-Port Async (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 concentrator 16e422 sync_pci 16-Port Enhanced RAN RS-422 for 128-Port Adapter if at AT ATM Network Interface adapter 14105300 pci IBM PCI 25MBPS ATM Adapter (14105300)
lsdev -CThe system displays a message similar to the following:
sys0 Available System Object sysplanar0 Available System Planar mem0 Available Memory L2cache0 Available L2 Cache proc0 Available 00-00 Processor pci0 Available PCI Bus pci1 Available PCI Bus isa0 Available 10-58 ISA Bus siota0 Available 01-Q1 Tablet Adapter ppa0 Available 01-R1 CHRP IEEE1284 (ECP) Parallel Port Adapter sa0 Available 01-S1 Standard I/O Serial Port sa1 Available 01-S2 Standard I/O Serial Port paud0 Available 01-Q2 Ultimedia Integrated Audio siokma0 Available 01-K1 Keyboard/Mouse Adapter fda0 Available 01-D1 Standard I/O Diskette Adapter scsi0 Available 10-60 Wide/Ultra-2 SCSI I/O Controller scsi1 Available 10-61 Wide/Ultra-2 SCSI I/O Controller 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 . . hd3 Defined Logical volume hd1 Defined Logical volume hd10opt Defined Logical volume inet0 Available Internet Network Extension en0 Available 10-80 Standard Ethernet Network Interface et0 Defined 10-80 IEEE 802.3 Ethernet Network Interface lo0 Available Loopback Network Interface pty0 Available Asynchronous Pseudo-Terminal gxme0 Defined Graphics Data Transfer Assist Subsystem rcm0 Available Rendering Context Manager Subsystem aio0 Defined Asynchronous I/O (Legacy) posix_aio0 Defined Posix Asynchronous I/O tty0 Available 01-S1-00-00 Asynchronous Terminal tty1 Available 01-S2-00-00 Asynchronous Terminal
lsdev -C -c adapter -S aThe 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 siokma0 Available 01-K1 Keyboard/Mouse Adapter fda0 Available 01-D1 Standard I/O Diskette Adapter scsi0 Available 10-60 Wide/Fast-20 SCSI I/O Controller fcs0 Available 10-68 FC Adapter scsi1 Available 10-88 Wide/Ultra-2 SCSI I/O Controller fcs1 Available 20-60 FC Adapter sioka0 Available 01-K1-00 Keyboard Adapter siota0 Available 01-Q1 Tablet Adapter ppa0 Available 01-R1 CHRP IEEE1284 (ECP) Parallel Port Adapter paud0 Available 01-Q2 Ultimedia Integrated Audio tok0 Available 10-70 IBM PCI Tokenring Adapter (14101800) ent0 Available 10-80 IBM 10/100 Mbps Ethernet PCI Adapter (23100020) sioma0 Available 01-K1-01 Mouse Adapter
lsdev -P -c tapeThe system displays a message similar to the following:
tape ost fcp Other FC SCSI Tape Drive tape scsd fcp FC SCSI Tape Drive tape ost iscsi Other iSCSI Tape Drive tape scsd iscsi iSCSI Tape Drive tape 1200mb-c scsi 1.2 GB 1/4-Inch Tape Drive tape 150mb scsi 150 MB 1/4-Inch Tape Drive tape 3490e scsi 3490E Autoloading Tape Drive tape 4mm2gb scsi 2.0 GB 4mm Tape Drive tape 4mm4gb scsi 4.0 GB 4mm Tape Drive tape 525mb scsi 525 MB 1/4-Inch Tape Drive tape 8mm scsi 2.3 GB 8mm Tape Drive tape 8mm5gb scsi 5.0 GB 8mm Tape Drive tape 8mm7gb scsi 7.0 GB 8mm Tape Drive tape 9trk scsi 1/2-inch 9-Track Tape Drive tape ost scsi Other SCSI Tape Drive tape scsd scsi SCSI Tape Drive tape 4mm2gb2 scsi 2.0 GB 4mm Tape Drive
lsdev -P -r classThe system displays a message similar to the following:
PCM adapter aio array bus cdrom concentrator container dial disk diskette drawer driver gxme if keyboard lft logical_volume lpfk lvm memory mouse pdisk planar port posix_aio printer processor pseudo pty rcm rwoptical swap sys tablet tape tcpip tmscsi tmssa tty
lsdev -P -c disk -r subclassThe system displays a message similar to the following:
dar fcp fdar ide iscsi scraid scsi ssar
lsdev -C -H -S a -F 'name class subclass type'The system displays a message similar to the following:
name class subclass type sys0 sys node chrp sysplanar0 planar sys sysplanar_rspc mem0 memory sys totmem L2cache0 memory sys L2cache_rspc proc0 processor sys proc_rspc pci0 bus chrp pci pci1 bus chrp pci isa0 bus pci isac siota0 adapter isa_sio isa_tablet ppa0 adapter isa_sio chrp_ecp sa0 adapter isa_sio pnp501 sa1 adapter isa_sio pnp501 paud0 adapter isa_sio baud4232 siokma0 adapter isa_sio kma_chrp fda0 adapter isa_sio pnp700 scsi0 adapter pci sym896 scsi1 adapter pci sym896 sa2 adapter pci 4f111100 sa3 adapter pci 4f111100 sa4 adapter pci 4f111100 ent0 adapter pci 23100020 mg20 adapter pci 2b102005 sa5 adapter pci 4f111100 sioka0 adapter kma_chrp keyboard sioma0 adapter kma_chrp mouse fd0 diskette siofd fd cd0 cdrom scsi scsd hdisk0 disk scsi scsd kbd0 keyboard std_k ps2 mouse0 mouse std_m mse_3b lvdd lvm lvm lvdd lft0 lft node lft inet0 tcpip TCPIP inet en0 if EN en lo0 if LO lo pty0 pty pty pty rcm0 rcm node rcm tty0 tty rs232 tty tty1 tty rs232 tty
lsdev -C -c adapter -F 'name class location physloc'The system displays a message similar to the following:
siota0 adapter 01-Q1 P1/Q1 ppa0 adapter 01-R1 P1/R1 sa0 adapter 01-S1 P1/S1 sa1 adapter 01-S2 P1/S2 paud0 adapter 01-Q2 P1/Q2 siokma0 adapter 01-K1 P1/K1 fda0 adapter 01-D1 P1/D1 scsi0 adapter 10-60 P1/Z1 scsi1 adapter 10-61 P1/Z2 sa2 adapter 10-68 P1-I3/Q1 sa3 adapter 10-70 P1-I4/Q1 sa4 adapter 10-78 P1-I5/Q1 ent0 adapter 10-80 P1/E1 mg20 adapter 10-88 P1-I6/G1 sa5 adapter 20-58 P1-I1/Q1 sioka0 adapter 01-K1-00 P1/K1 sioma0 adapter 01-K1-01 P1/K1
lsdev -l hdi*The system displays a message similar to the following:
hdisk0 Available 10-60-00-8,0 16 Bit SCSI Disk Drive hdisk1 Available 10-60-00-9,0 16 Bit SCSI Disk Drive
lsdev -p pci0The system displays a message similar to the following:
ent0 Available 10-80 IBM 10/100 Mbps Ethernet PCI Adapter (23100020) isa0 Available 10-58 ISA Bus scsi0 Available 10-60 Wide/Fast-20 SCSI I/O Controller scsi1 Available 10-88 Wide/Ultra-2 SCSI I/O Controller tok0 Available 10-70 IBM PCI Tokenring Adapter (14103e00)
cat /tmp/f | lsdev -l -The system displays a message similar to the following:
pci0 Available PCI Bus scsi0 Available 10-60 Wide/Fast-20 SCSI I/O Controller hdisk0 Available 10-60-00-8,0 16 Bit SCSI Disk Drive
| /usr/sbin/lsdev | Contains the lsdev command. |
The chdev command, lsattr command, lsconn command, lsparent command, mkdev command, rmdev command.
Devices Overview for System Management in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices provides information about adding, changing, moving, and removing devices.
For information on installing the Web-based System Manager, see Chapter 2: Installing Web-based System Manager in AIX 5L Version 5.2 Web-based System Manager Administration Guide.
System Management Interface Tool (SMIT) Overview in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices tells you about the SMIT application.