Example: A-17 Sample /proc/scsi/qla2300/x

knox:~ # cat /proc/scsi/qla2300/2

QLogic PCI to Fibre Channel Host Adapter for ISP23xx: Firmware version: 3.01.18, Driver version 6.05.00b9

Entry address = c1e00060 HBA: QLA2312 , Serial# H28468

Request Queue = 0x21f8000, Response Queue = 0x21e0000 Request Queue count= 128, Response Queue count= 512

.

.

Login retry count = 012

Commands retried with dropped frame(s) = 0

SCSI Device Information: scsi-qla0-adapter-node=200000e08b0b941d; scsi-qla0-adapter-port=210000e08b0b941d; scsi-qla0-target-0=5005076300c39103;

SCSI LUN Information: (Id:Lun)

(0: 0): Total reqs 99545, Pending reqs 0, flags 0x0, 0:0:81,

(0: 1): Total reqs 9673, Pending reqs 0, flags 0x0, 0:0:81,

(0: 2): Total reqs 100914, Pending reqs 0, flags 0x0, 0:0:81,

Performance monitoring with iostat

The iostat command can be used to monitor the performance of all attached disks. It is shipped with every major Linux distribution, but not necessarily installed by default. It reads data provided by the kernel in /proc/stats and prints it in human readable format. See the manpage of iostat for more details.

The generic SCSI tools

The SUSE Linux Enterprise Server comes with a set of tools that allow low-level access to SCSI devices. They are called the sg tools. They talk to the SCSI devices through the generic SCSI layer, which is represented by special device files /dev/sg0, /dev/sg0, and so on.

By default SLES 8 provides sg device files for up to 16 SCSI devices (/dev/sg0 through /dev/sg15). Additional sg device files can be created using the command mknod. After creating new sg devices you should change their group setting from root to disk. Example A-18shows the creation of /dev/sg16, which would be the first one to create.

Example: A-18 Creation of new device files for generic SCSI devices

mknod /dev/sg16 c 21 16 chgrp disk /dev/sg16

Useful sg tools are:

￿sg_inq /dev/sgx prints SCSI Inquiry data, such as the volume serial number.

￿sg_scan prints the /dev/sg scsihost, channel, target, LUN mapping.

￿sg_map prints the /dev/sd /dev/sg mapping.

￿sg_readcap prints the block size and capacity (in blocks) of the device.

￿sginfo prints SCSI inquiry and mode page data; it also allows manipulating the mode pages.

Appendix A. Open systems operating systems specifics 365

Page 387
Image 387
IBM DS8000 manual Performance monitoring with iostat, Generic Scsi tools, Example A-17 Sample /proc/scsi/qla2300/x