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 ] [ -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, 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.
You can use a Web-based System Manager Devices application (wsm devices fast path) to run this command. 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. This flag cannot be used with the -P flag. |
-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. |
-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. 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 adapter kts sio Keyboard/Tablet/Sound system keyboard kb101 keyboard United States keyboard keyboard kb102 keyboard International keyboard keyboard kb106 keyboard Kanji keyboard keyboard kb5086 keyboard 5086 keyboard tablet 5083_m21 tablet 6.144 x 6.144 inch tablet tablet 5083_m22 tablet 11.5 x 11.5 inch tablet . . . tty tty rs232 Asynchronous Terminal tty tty rs422 Asynchronous Terminal tty tty mil188 Asynchronous Terminal
lsdev -CThe system displays a message similar to the following:
sio0 Available 00-00 Standard I/O Planar fda0 Available 00-00-0D Standard I/O Diskette Adapter sa0 Available 00-00-S1 Standard I/O Serial Port 1 sa1 Available 00-00-S2 I/O Serial Port 2 tty0 Defined Asynchronous Terminal . . . scsi0 Available 00-07 SCSI I/O Controller cd0 Available 00-07-00-30 CD-ROM Drive rmt0 Available 00-07-00-40 2.3 GB 8mm Tape Drive hdisk0 Available 00-07-00-00 670 MB SCSI Disk Drive hdisk1 Available 00-07-00-10 670 MB SCSI Disk Drive hdisk2 Available 00-07-00-20 670 MB SCSI Disk Drive
lsdev -C -c adapter -S aThe system displays a message similar to the following:
sio0 Available 00-00 Standard I/O Planar fda0 Available 00-00-0D Standard I/O Diskette Adapter kts0 Available 00-00-0K Keyboard Tablet/Sound system sa0 Available 00-00-S1 Standard I/O Serial Port 1 sa1 Available 00-00-S2 Standard I/O Serial Port 2 scsi0 Available 00-07 SCSI I/O Controller mous0 Available 00-00-0M Mouse device
lsdev -P -c tapeThe system displays a message similar to the following:
tape 8mm scsi 2.3GB 8mm Tape Drive tape 9trk scsi 1.2-inch 9-Track Tape Drive tape 150mb scsi 150 MB 1/4-inch Tape Drive
lsdev -P -r classThe system displays a message similar to the following:
adapter bus cdrom disk diskette . . . planar printer pty sys sysunit tablet tape tcpip tty
lsdev -P -c disk -r subclassThe system displays a message similar to the following:
mca scsi
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 sys sysunit0 sysunit sys sysunit . . . sa0 adapter mca 8p232 fd0 diskette siofd fd fd1 diskette siofd fd tty0 tty rs232 tty scsi0 adapter mca hscsi hdisk0 disk scsi 670mb hdisk1 disk scsi 355mb lp0 printer parallel 4201-3
/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 Version 4.3 System Management Guide: Operating System and Devices provides information about adding, changing, moving, and removing devices.
Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.
System Management Interface Tool (SMIT) Overview in AIX Version 4.3 System Management Guide: Operating System and Devices tells you about the SMIT application.