HP Certified: HP-UX System Administration

   

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.

Using the ll Command

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.

Using the ioscan Command

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.

Using the lssf Command

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:

Usable Devices

The ioscan command with the -u option shows only usable devices. The usable devices have the software driver bound to the device.

Study Break

Listing and Naming Device Files

You have seen that a particular naming convention is used with devices attached to an SCSI interface. Use the command ioscan -funC lan to list all network interfaces attached to the system and see if there is any particular naming convention. The lssf command shows additional features of a device file. Go to the /dev/rmt directory where tape device files are stored. Use the lssf command on all of these files and see what characteristics each file has. Consult Table 17-2 to compare these characteristics with the device name .


   
Top

Категории