LSZFCP(8)
π LSZFCP(8) β the manual page, but make it make sense
ok so picture this: you're deep in a zfcp situation (Fibre Channel, mainframe, the whole vibe) and you need to know what's actually there. That's lszfcp β it lives in section 8 of the System Manager's Manual and it's literally your bestie for peeking at sysfs. Let's get into it π«Ά
NAME β¨
lszfcp β list information about zfcp adapters, ports, and units
SYNOPSIS πΈ
lszfcp [-hvVaZHDPem] [-b busid] [-l lun] [-p wwpn] [-s /path/to/sys]
DESCRIPTION π
okay so lszfcp gives you the tea that lives in sysfs about zfcp adapters, ports and units β plus all their little friends: the associated scsi_hosts, fc_hosts, fc_remote_ports and scsi_devices. it's giving family tree, honestly.
The default behaviour β no flags, just vibes β is to list the busids of all zfcp adapters and their corresponding SCSI host names. simple, clean, iconic.
There are four output variants, bestie. write this down:
- Default (i.e. without options
"-a"or"-V"or"-Z") is one line for each object.- For the zfcp device driver (module), its parameters are listed.
- For adapters, the busid and their corresponding SCSI host names are listed.
- For ports, the pair
"busid"/"wwpn"and their corresponding FC-remote-port names are listed. - For units, the triple
"busid"/"wwpn"/"lun"and their corresponding SCSI device names are listed.
- Option
"-V"additionally shows the sysfs paths of interest for the listed object. and if a SCSI device has an associated block device (disk) and SCSI generic (sg) device, it shows their sysfs paths in a 3rd line. extra line, extra detail, we love that. - Option
"-a"additionally shows attributes of interest found in 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. And 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. yes,-mmis a thing. double it and give it to the next person.
Option "-e" enables an extended output format. it enumerates all hosts/ports/luns independent of their state β no filtering, no judgment. it also produces some improved error messages. the extended output format can help determining problems, which is genuinely so useful.
ngl, here's the sad lore: since a long time, without option "-e", lszfcp has not enumerated:
- hosts that have never been online (since last bind to zfcp device driver)
- hosts that are defunct (CHPID configured off, or z/VM detach)
- ports with
fc_rportport_stateunequal to"Online"(such as fibres pulled) - zfcp units without associated SCSI device (
unit_addof non-existent LUN)
so if something's missing and you're like "where is it π" β that's why. add -e. periodt.
OPTIONS π
-a,--attributesβ Show the most interesting attributes of the specified objects.-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.-Z,--modparmsβ List zfcp (module) parameters with a scope of the device driver.-D,--devicesβ List zfcp units and SCSI devices.-H,--hostsβ List zfcp adapters, fc-hosts, and scsi-hosts (default). Without option"-e", information is given only for adapters that are online (registered at the SCSI stack).-P,--portsβ List zfcp ports and FC remote ports.-bbusid,--busidbusid β Show zfcp adapter, fc-host selected by busid.-llun,--lunlun β List zfcp unit(s) and SCSI device(s) selected by lun. (Information for several units might be shown if devices with equivalent LUNs are configured for different adapters or ports.)-pwwpn,--wwpnwwpn β List zfcp port(s) and FC remote port(s) selected by wwpn. (Information for several ports might be shown if a remote port is configured for different adapters.)-e,--extendedβ Generate extended output.-V,--verboseβ Generate verbose output. Display sysfs path names of class and bus devices that are of interest for this object. If a SCSI device has an associated block device (disk) and SCSI generic (sg) device, show their sysfs paths in a 3rd line.-s,--sysfs/path/to/sys β Use path as sysfs (for dbginfo archives).-h,--helpβ Print help message and exit.-v,--versionβ Display version info and exit.
NOTE π
Options "-b", "-p" or "-l" are of restricting nature. they're the "narrow it down" girlies β they limit the output to those adapters, ports or units that match the specified busid, wwpn and lun.
and here's the little implication situation: if none of the options "-Z", "-H", "-P" and "-D" are specified, then:
"-b"implies"-H""-p"implies"-P""-l"implies"-D"
so you don't even have to spell it out. it knows. π
EXAMPLES π
lszfcp -P -H -D -V Show all device paths of all zfcp adapters, ports, units and its associated SCSI devices, SCSI hosts, FC hosts and FC remote ports
lszfcp -b 0.0.0815 -a Show all attributes of ccw_device, scsi_host and fc_host which belong to the adapter with busid "0.0.0815".
lszfcp -D -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000 Show the device which matches the given busid, wwpn and lun.
lszfcp -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000 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.
lszfcp -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000 -H -P -D Generates same output as previous example.
lszfcp -ZHPDVeamm Generates the fullest output in the extended format.
ngl that last one is the main character of this whole page. -ZHPDVeamm. say it out loud. it ate. π₯
SEE ALSO π
that's the whole thing bestie, go forth and enumerate π¦
s390-tools, Feb 2019 β mwah, that's the version and date, we stan a documented release π
π¦ where this page comes from
- opensuse-leap 16.0: s390-tools 2.44.1-160000.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms