The device files associated with the installed devices can be listed using one of the ll , ioscan , or lssf commands. Each of these commands lists particular characteristics of device files.
Consider this list of files displayed by the ll command.
$ ll /dev/rmt/0m* crw-rw-rw- 2 bin bin 212 0x030000 Oct 28 1997 /dev/rmt/0m crw-rw-rw- 2 bin bin 212 0x030080 Sep 29 1997 /dev/rmt/0mb crw-rw-rw- 2 bin bin 212 0x030040 Sep 29 1997 /dev/rmt/0mn crw-rw-rw- 2 bin bin 212 0x0300c0 Sep 29 1997 /dev/rmt/0mnb $
The ll command lists the following features of a device file.
Type of the file. If the first character of an output line is "c", it is a character or raw device file. If the first character is "b", it is a block-type file.
The major number of the device file in field 5, which is 212 in this listing.
The minor number of the file in field 6.
The ioscan command has an advantage over the ll command in that it shows which device is attached to which file. It can also be used to list device files related to a particular class of devices. Output of the ioscan -funC disk command is shown here, which displays a list of all device files linked to class disk .
# ioscan -funC disk Class I H/W Path Driver S/W State H/W Type Description =========================================================== disk 16 10/0.1.0 sdisk CLAIMED DEVICE SEAGATE ST34371W /dev/dsk/c2t1d0 /dev/rdsk/c2t1d0 disk 17 10/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC /dev/dsk/c2t2d0 /dev/rdsk/c2t2d0 disk 18 10/0.3.0 sdisk CLAIMED DEVICE SEAGATE ST34371W /dev/dsk/c2t3d0 /dev/rdsk/c2t3d0 disk 19 10/0.4.0 sdisk CLAIMED DEVICE SEAGATE ST34371W /dev/dsk/c2t4d0 /dev/rdsk/c2t4d0 disk 20 10/0.5.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t5d0 /dev/rdsk/c2t5d0 disk 21 10/0.6.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t6d0 /dev/rdsk/c2t6d0 disk 22 10/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD- ROM XM-5401TA /dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
Note that CD-ROM is also included in the "disk" class of devices. Similarly, to list all tape devices, you can use the ioscan -funC tape command. The ioscan command lists the following device file characteristics.
Device class. If you use ioscan without any class option, it lists all devices attached to the system. From the first column of the output, you can find which device is related to which class.
Instance number of the device.
Hardware path of the device.
Kernel driver used for the device.
S/W state that shows whether the device driver is attached to the device.
Description field that shows what type of device it is.
You have seen that more than one file is attached to a tape device. The lssf command shows the characteristics of each device file. Consider the output of the following command.
$ lssf /dev/rmt/c4t1d0BESTn stape card instance 4 SCSI target 1 SCSI LUN 0 at&t no rewind best density available at address 10/8.1.0 /dev/ rmt/c4t1d0BESTn $
This output shows additional information that ioscan does not provide. Specifically it shows that:
The tape device file uses AT&T-style tape behavior.
It will not rewind automatically.
It will use the best density available for writing data.
The ioscan command with the -u option shows only usable devices. The usable devices have the software driver bound to the device.
Study BreakListing and Naming Device Files
|
Top |