mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
47fcc71f96286be7e6d6190d6cb1663b6cf0f6cb
11 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9c56255a70 |
lszfcp: new command line option to show module parameters
I often use "systool -v -m zfcp" but that's a bit longish to type and contains more output than just the parameters I'm interested in. "tail /sys/module/zfcp/parameters/*" is also not so nice. "lszfcp -Z" makes it very easy and can be combined with the other existing output options of lszfcp. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
a20cabccc4 |
lszfcp: sdev attributes for scsi_disk, block, integrity, queue, iosched
Show if command line option for more attribute details specified twice
and depending on existence in sysfs (i.e. not for non-disk such as tape).
Abbreviated examples:
$ lszfcp -DVeamm
/sys/devices/css0/0.0.0019/0.0.1880/0x50050763031bd327/0x4045400300000000
/sys/bus/ccw/drivers/zfcp/0.0.1880/host2/rport-2:0-0/target2:0:0/2:0:0:1073954885
/sys/block/sdd /sys/class/scsi_generic/sg3
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "0"
in_recovery = "0"
status = "0x54000000"
Class = "scsi_device"
...
modalias = "scsi:t-0x00"
model = "2107900"
scsi_level = "6"
state = "running"
type = "0"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x54000000"
Class = "scsi_disk"
allow_restart = "0"
app_tag_own = "1"
cache_type = "write back"
FUA = "0"
manage_start_stop = "0"
max_medium_access_timeouts = "2"
max_write_same_blocks = "65535"
protection_mode = "dix1"
protection_type = "1"
provisioning_mode = "unmap"
thin_provisioning = "1"
zeroing_mode = "writesame"
Class = "block"
alignment_offset = "0"
capability = "50"
dev = "8:48"
discard_alignment = "0"
size = "2097152"
...
uevent = "MAJOR=8"
Class = "block_integrity"
device_is_integrity_capable = "1"
format = "T10-DIF-TYPE1-IP"
protection_interval_bytes = "512"
read_verify = "1"
tag_size = "2"
write_generate = "1"
Class = "block_queue"
add_random = "1"
chunk_sectors = "0"
dax = "0"
discard_granularity = "1073741824"
discard_max_bytes = "4294966784"
discard_max_hw_bytes = "4294966784"
discard_zeroes_data = "0"
hw_sector_size = "512"
io_poll = "0"
io_poll_delay = "0"
iostats = "1"
logical_block_size = "512"
max_discard_segments = "1"
max_hw_sectors_kb = "1076"
max_integrity_segments = "269"
max_sectors_kb = "1076"
max_segments = "269"
max_segment_size = "4096"
minimum_io_size = "512"
nomerges = "0"
nr_requests = "128"
optimal_io_size = "0"
physical_block_size = "512"
read_ahead_kb = "512"
rotational = "1"
rq_affinity = "1"
scheduler = "noop [deadline] cfq"
write_cache = "write back"
write_same_max_bytes = "33553920"
write_zeroes_max_bytes = "33553920"
zoned = "none"
Class = "block_queue_iosched"
fifo_batch = "16"
front_merges = "1"
read_expire = "500"
write_expire = "5000"
writes_starved = "2"
/sys/devices/css0/0.0.0222/0.0.3c80/0x2002000e1115c62f/0x0000000000000000
/sys/bus/ccw/drivers/zfcp/0.0.3c80/host4/rport-4:0-2/target4:0:2/4:0:2:0
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "0"
in_recovery = "0"
status = "0x54000000"
Class = "scsi_device"
...
modalias = "scsi:t-0x01"
model = "ULT3580-TD6"
scsi_level = "7"
state = "running"
type = "1"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x54000000"
/sys/devices/css0/0.0.0222/0.0.3c80/0x2002000e1115c62f/0x0001000000000000
/sys/bus/ccw/drivers/zfcp/0.0.3c80/host4/rport-4:0-2/target4:0:2/4:0:2:1
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "0"
in_recovery = "0"
status = "0x54000000"
Class = "scsi_device"
...
modalias = "scsi:t-0x08"
model = "3573-TL"
scsi_level = "6"
state = "running"
type = "8"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x54000000"
/sys/devices/css0/0.0.0222/0.0.3c80/0x500507630313d327/0xffffffffffffffff failed
-
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "1"
in_recovery = "0"
status = "0x00000000"
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
|
||
|
|
f67758160e |
lszfcp: allow to show zfcp_units without associated SCSI device
Useful to detect configuration errors and FCP LUN typos.
Example:
$ lszfcp -De
0.0.3c80/0x500507630313d327/0xffffffffffffffff - failed
$ lszfcp -DeV
/sys/devices/css0/0.0.0222/0.0.3c80/0x500507630313d327/0xffffffffffffffff failed
-
$ lszfcp -Deam
0.0.3c80/0x500507630313d327/0xffffffffffffffff - failed
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "1"
in_recovery = "0"
status = "0x00000000"
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
|
||
|
|
e84287e76e |
lszfcp: attribute details for: css, zfcp_port, zfcp_unit
Consistency with "lszfcp -Ha" which includes zfcp_adapter as class=ccw.
Attribute details are especially useful to show the driver-internal status.
For FCP devices (hosts), "css" shows subchannel details including CHPID.
Abbreviated examples:
$ lszfcp -PVeam -b 0.0.50c0 -p 0x500507680b2481fa
- (NoMoreZfcpPort:0.0.50c0/0x500507680b2481fa)
/sys/class/fc_remote_ports/rport-6:0-2 NotOnline
Class = "fc_remote_ports"
dev_loss_tmo = "60"
fast_io_fail_tmo = "off"
maxframe_size = "2048 bytes"
node_name = "0x500507680b0081fa"
port_id = "0x242200"
port_name = "0x500507680b2481fa"
port_state = "Blocked"
roles = "FCP Target"
scsi_target_id = "2"
supported_classes = "Class 2, Class 3"
$ lszfcp -HPDeam
0.0.1900 host0
Bus = "css"
chpids = "60 00 00 00 00 00 00 00"
modalias = "css:t0"
pimpampom = "80 80 ff"
type = "0"
uevent = "DRIVER=io_subchannel"
vpm = "80"
Bus = "ccw"
availability = "good"
...
failed = "0"
in_recovery = "0"
online = "1"
status = "0x5400040b"
...
Class = "fc_host"
...
port_state = "Online"
port_type = "NPIV VPORT"
...
Class = "scsi_host"
...
state = "running"
...
0.0.1940 host8 offline
Bus = "css"
chpids = "61 00 00 00 00 00 00 00"
modalias = "css:t0"
pimpampom = "80 80 ff"
type = "0"
uevent = "DRIVER=io_subchannel"
vpm = "80"
Bus = "ccw"
availability = "good"
...
failed = "0"
in_recovery = "0"
online = "0"
status = "0x00000401"
...
Class = "fc_host"
...
port_state = "Unknown"
port_type = "NPIV VPORT"
...
Class = "scsi_host"
...
state = "running"
...
0.0.5000 host1 offline
Bus = "css"
chpids = "67 00 00 00 00 00 00 00"
modalias = "css:t0"
pimpampom = "80 80 ff"
type = "0"
uevent = "DRIVER=io_subchannel"
vpm = "80"
Bus = "ccw"
availability = "good"
...
failed = "0"
in_recovery = "0"
online = "0"
status = "0x00000401"
uevent = "DRIVER=zfcp"
...
Class = "fc_host"
...
port_state = "Unknown"
port_type = "NPort (fabric via point-to-point)"
...
Class = "scsi_host"
...
state = "running"
...
0.0.3c40 host7 defunct
Bus = "css"
defunct
Bus = "ccw"
availability = "no device"
...
failed = "0"
in_recovery = "0"
online = "1"
status = "0x00000401"
...
Class = "fc_host"
...
port_state = "Unknown"
port_type = "NPIV VPORT"
...
Class = "scsi_host"
...
state = "running"
...
0.0.1880 - offline
Bus = "css"
chpids = "5a 00 00 00 00 00 00 00"
modalias = "css:t0"
pimpampom = "80 80 ff"
type = "0"
uevent = "DRIVER=io_subchannel"
vpm = "00"
Bus = "ccw"
availability = "good"
cmb_enable = "0"
cutype = "1731/03"
devtype = "1732/03"
modalias = "ccw:t1731m03dt1732dm03"
online = "0"
uevent = "DRIVER=zfcp"
0.0.1900/0x500507630708c5e3 rport-0:0-0
Class = "zfcp_port"
access_denied = "0"
failed = "0"
in_recovery = "0"
status = "0x54000001"
Class = "fc_remote_ports"
dev_loss_tmo = "2147483647"
fast_io_fail_tmo = "5"
maxframe_size = "2112 bytes"
node_name = "0x5005076307ffc5e3"
port_id = "0x675c00"
port_name = "0x500507630708c5e3"
port_state = "Online"
roles = "FCP Target"
scsi_target_id = "0"
supported_classes = "Class 2, Class 3"
0.0.5000/0x500507680b2381fb rport-1:0-0 NotOnline
Class = "zfcp_port"
access_denied = "0"
failed = "0"
in_recovery = "0"
status = "0x00000001"
Class = "fc_remote_ports"
dev_loss_tmo = "2147483647"
fast_io_fail_tmo = "5"
maxframe_size = "2048 bytes"
node_name = "0x500507680b0081fb"
port_id = "0x24e200"
port_name = "0x500507680b2381fb"
port_state = "Blocked"
roles = "FCP Target"
scsi_target_id = "0"
supported_classes = "Class 2, Class 3"
0.0.5040/0x500507680b2281fa rport-2:0-0
Class = "zfcp_port"
access_denied = "0"
failed = "0"
in_recovery = "0"
status = "0x54000001"
Class = "fc_remote_ports"
dev_loss_tmo = "2147483647"
fast_io_fail_tmo = "5"
maxframe_size = "2048 bytes"
node_name = "0x500507680b0081fa"
port_id = "0x24a300"
port_name = "0x500507680b2281fa"
port_state = "Online"
roles = "FCP Target"
scsi_target_id = "0"
supported_classes = "Class 2, Class 3"
0.0.1940/0x500507630718c5e3 rport-8:0-0 NotOnline
Class = "zfcp_port"
access_denied = "0"
failed = "0"
in_recovery = "0"
status = "0x00000001"
Class = "fc_remote_ports"
dev_loss_tmo = "2147483647"
fast_io_fail_tmo = "5"
maxframe_size = "2112 bytes"
node_name = "0x5005076307ffc5e3"
port_id = "0x675e00"
port_name = "0x500507630718c5e3"
port_state = "Blocked"
roles = "FCP Target"
scsi_target_id = "0"
supported_classes = "Class 2, Class 3"
0.0.1900/0x500507630708c5e3/0x4000408600000000 0:0:0:1082540032 auto
Class = "scsi_device"
...
state = "running"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x54000000"
0.0.1940/0x500507630718c5e3/0x4000408600000000 8:0:0:1082540032 auto NotRunning
Class = "scsi_device"
...
state = "transport-offline"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x00000000"
0.0.5000/0x500507680b2381fb/0x0256000000000000 1:0:0:598 NotRunning
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "0"
in_recovery = "0"
status = "0x00000000"
Class = "scsi_device"
...
state = "transport-offline"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x00000000"
0.0.5040/0x500507680b2281fa/0x0256000000000000 2:0:0:598
Class = "zfcp_unit"
access_denied = "0"
access_readonly = "0"
access_shared = "0"
failed = "0"
in_recovery = "0"
status = "0x54000000"
Class = "scsi_device"
...
state = "running"
...
zfcp_access_denied = "0"
zfcp_failed = "0"
zfcp_in_recovery = "0"
zfcp_status = "0x54000000"
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
|
||
|
|
94b7a8f68d |
lszfcp: allow to also enumerate FCP device that have never been online
Since zfcp lazily allocates Scsi_Host et al. on setting an FCP device
online for the first time since the last driver core bind to zfcp
(such as zfcp kernel module load),
lszfcp has only been showing FCP devices (vHBAs) that have been online
at least once including those that have been set offline again.
This is somewhat confusing.
Also it would be nice if lszfcp could be an easier to type replacement for
"lscss -t 17032/03" to simply show all devices bound to the zfcp device
driver.
Of course those FCP devices that have never been online, won't have any
zfcp-specific attribute details, only CIO attributes from the CCW bus.
They also do not have a Scsi_Host nor fc_host.
In order not to break any scripting or expectations around lszfcp,
make the new feature depend on the extended output command line option.
Example:
$ lszfcp -He
0.0.1880 - offline
$ lszfcp -HeV
/sys/devices/css0/0.0.010b/0.0.1880 offline
-
-
$ lszfcp -Hea
0.0.1880 - offline
Bus = "ccw"
availability = "good"
cmb_enable = "0"
cutype = "1731/03"
devtype = "1732/03"
modalias = "ccw:t1731m03dt1732dm03"
online = "0"
uevent = "DRIVER=zfcp"
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Fedor Loshakov <loshakov@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
|
||
|
|
a9684b9154 |
lszfcp: fix error message if no zfcp-attached SCSI device found
s390-tools-1.8.1 introduced a new error message. It gave the same and thus misleading error message as if no FCP device (vHBA) found. In order not to break any scripting built around lszfcp output, only print the fixed error message depending on the extended output command line option. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
6d31760872 |
lszfcp: fix to show defunct FCP devices again
s390-tools-1.8.0 introduced a regression skipping all FCP devices that are currently "defunct". Changing $SYSFS/devices/css0/*/*/host* to $SYSFS/devices/css0/[0-9]*/[0-9]*/host* was too strict as it won't match $SYSFS/devices/css0/defunct/[0-9]*/host* anymore. Fix: $SYSFS/devices/css0/[0-9d]*/[0-9]*/host* Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
b0dcc61ed5 |
lszfcp: fix to show non-good target ports again
s390-tools-1.8.1 introduced a regression skipping all fc_rports with port_state != Online. While we need to skip some output parts for a zfcp_port which does not exist anymore due to port_remove, there are other cases with port_state != Online for which we should not skip an fc_rport. Such as port_state "Blocked" after a cable pull beyond host-adjacent switch or port_state "Not Present" after dev_loss_tmo ran out. This way the user can see the previously discovered ports, even if they might currently not be usable for traffic. Non-good ports are marked in the short output with suffix "NotOnline". In order not to break scripting or expectations around lszfcp, make the new feature depend on the extended output command line option. Sysfs path globbing does not work for a removed zfcp_port to obtain the FCP device bus-ID. Instead, properly walk the sysfs. Examples with a removed zfcp_port: $ lszfcp -Pe 0.0.50c0/0x500507680b2481fa rport-6:0-2 $ lszfcp -PeV - (NoMoreZfcpPort:0.0.50c0/0x500507680b2481fa) /sys/class/fc_remote_ports/rport-6:0-2 Examples with an existing zfcp_port but pulled fibre: $ lszfcp -Pe 0.0.3c40/0x500507680b2181fb rport-7:0-4 $ lszfcp -PeV /sys/devices/css0/defunct/0.0.3c40/0x500507680b2181fb /sys/class/fc_remote_ports/rport-7:0-4 Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
a3e37953fe |
lszfcp: fix missing block & sg device output without CONFIG_SYSFS_DEPRECATED
lszfcp -DVe was missing a 3rd SCSI device header line like: /sys/devices/css0/0.0.0019/0.0.1880/0x50050763031bd327/0x4045400000000000 /sys/bus/ccw/drivers/zfcp/0.0.1880/host0/rport-0:0-0/target0:0:0/0:0:0:1073758277 /sys/block/sda /sys/class/scsi_generic/sg0 Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
abf18cb711 |
lszfcp: new command line option for extended output format
Used in subsequent patches to guard their changes in order not to break any scripting or expectations around the lszfcp output format. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> |
||
|
|
b627b8d8e1 |
Initial s390-tools-2.0.0 import
This commit is based on the s390-tools-1.39.0 version. Changes on top of s390-tools-1.39.0: - Add MIT license to all source files - Add LICENSE file - Transform REAMDE to README.md (markdown) - Add AUTHORS.md file - Add CONTRIBUTING.md file - Move changelog from README to CHANGELOG.md file Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> |