diff --git a/zconf/lszfcp b/zconf/lszfcp index e31d8dde..e64864d5 100755 --- a/zconf/lszfcp +++ b/zconf/lszfcp @@ -115,6 +115,8 @@ OPTIONS: -a, --attributes show attributes -m, --moreattrs show more attributes (host: css; port: zfcp_port; SCSI device: zfcp_unit) + specify twice to show more attributes for SCSI devices + (scsi_disk,block,integrity,queue,iosched) -V, --verbose show sysfs paths of associated class and bus devices -e, --extended extended output format @@ -445,6 +447,30 @@ show_devices() if $SHOW_ATTRIBUTES; then echo 'Class = "scsi_device"' show_attributes "$SCSI_DEVICE_PATH" + fi + if $SHOW_ATTRIBUTES && [ $SHOW_MORE_ATTRS -ge 2 ]; then + if [ -d $SCSI_DEVICE_PATH/scsi_disk ]; then + echo 'Class = "scsi_disk"' + show_attributes "$SCSI_DEVICE_PATH/scsi_disk/$(basename $SCSI_DEVICE_PATH)" + fi + if [ -d $SCSI_DEVICE_PATH/block ]; then + echo 'Class = "block"' + show_attributes "$SCSI_DEVICE_PATH/block/*/" + fi + if [ -d $SCSI_DEVICE_PATH/block/*/integrity ]; then + echo 'Class = "block_integrity"' + show_attributes "$SCSI_DEVICE_PATH/block/*/integrity" + fi + if [ -d $SCSI_DEVICE_PATH/block/*/queue ]; then + echo 'Class = "block_queue"' + show_attributes "$SCSI_DEVICE_PATH/block/*/queue" + fi + if [ -d $SCSI_DEVICE_PATH/block/*/queue/iosched ]; then + echo 'Class = "block_queue_iosched"' + show_attributes "$SCSI_DEVICE_PATH/block/*/queue/iosched" + fi + fi + if $SHOW_ATTRIBUTES; then echo fi done diff --git a/zconf/lszfcp.8 b/zconf/lszfcp.8 index 2ad4f3ac..6eb72380 100644 --- a/zconf/lszfcp.8 +++ b/zconf/lszfcp.8 @@ -45,6 +45,10 @@ sysfs for the listed object. Option "-m" together with option "-a" shows sysfs attributes if available for: host: css (subchannel); port: zfcp_port; lun: zfcp_unit. +Specifying option "-m" twice together with option "-a" +additionally shows SCSI device sysfs attributes +if available for: +scsi_disk, block, block_integrity, block_queue, block_queue_iosched. Option "-e" enables an extended output format. It enumerates all hosts/ports/luns independent of their state. @@ -67,6 +71,9 @@ Show the most interesting attributes of the specified objects. .B -m, --moreattrs Show more attributes of the specified objects. Host: css (subchannel). Port: zfcp_port. Lun: zfcp_unit. +If specified twice, +show additional attributes of the specified SCSI device objects: +scsi_disk, block, block_integrity, block_queue, block_queue_iosched. .TP .B -D, --devices List zfcp units and SCSI devices. @@ -133,6 +140,8 @@ Show all adapters that match the given busid, all ports that match the given busid and wwpnn and show all units that match the given busid, wwpn and lun. .IP "lszfcp -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000 -H -P -D" Generates same output as previous example. +.IP "lszfcp -HPDVeamm" +Generates the fullest output in the extended format. .SH "SEE ALSO" .BR lscss (8)