While investigating a disk performance issue this week, I needed to find the queue depth of a block device. There are several ways to do this, but I think the lsscsi “-l” option takes the cake:
$ lsscsi -l
[0:0:0:0] disk ATA Samsung SSD 840 CB6Q /dev/sda
state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
[1:0:0:0] disk ATA WDC WD20EZRZ-00Z 0A80 /dev/sdb
state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
[2:0:0:0] disk ATA WDC WD20EZRZ-00Z 0A80 /dev/sdc
state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
[5:0:0:0] disk ATA WDC WD15EADS-00P 0A01 /dev/sdd
state=running queue_depth=31 scsi_level=6 type=0 device_blocked=0 timeout=30
Simple, easy and elegant. Noting this for future reference.