| lszdev(8) | lszdev | lszdev(8) |
lszdev - Display configuration of z Systems specific devices
lszdev [ TYPE DEVICE SELECTION ACTIONS OPTIONS ]
lszdev displays the configuration of devices and device drivers that are specific to IBM z Systems. Supported device types include storage devices (DASD and zFCP) and networking devices (QETH, CTC and LCS).
lszdev can produce output in either list format or detailed format. With no further options specified, the output format defaults to list format.
There are three sources for configuration information: the active configuration of the currently running system, the persistent configuration stored in configuration files, and the auto-configuration that is provided by some machine types to automatically enable I/O devices.
Persistent configuration data is of two different types. Site-specific configuration and common-configuration. Common configuration refers to the persistent configuration which is not bound to any site. In many use cases, this configuration is being used as a fallback configuration. Refer the site section below to learn more about site-specific configuration.
By default lszdev displays information from both the active and the persistent configuration, and, if available, from the auto-configuration.
In list format, lszdev uses values with the following meaning for the persistent columns (PERS):
yes A persistent, non-site specific configuration exists; No site specific configurations available.
no No persistent configurations is available.
auto Machine-provided auto-configuration is available.
s<n> A site-specific configuration is available for site-id n.
s+ Site specific configurations are available for multiple sites.
Example
TYPE ID ON PERS NAMES
dasd-eckd 0.0.f001 no s+ dasda
dasd-eckd 0.0.f002 no s4 dasdb
dasd-eckd 0.0.f003 no no
qeth 0.0.1200:0.0.1201:0.0.1202 no yes encbdf0
lszdev uses device type names to distinguish devices by their respective type. A device type typically corresponds to a device driver, though there are cases where multiple device types are provided for the same driver (for example both device types "dasd-eckd" and "dasd-fba" are related to the DASD device driver).
You can use the TYPE positional argument to restrict output to the specified device type:
To get a list of supported device types, use the --list-types action.
You can use the DEVICE positional argument to select a single device or a range of devices by device ID. To select a range of devices, specify the ID of the first and the last device in the range separated by a hyphen (-). Multiple IDs or ranges can be specified by separating ID specifications with a comma (,).
Example: lszdev dasd 1000,2000-2010
In addition to specifying devices by their ID, you can also select devices by their state or by the Linux functions they provide.
lszdev supports the following device states:
Selection works in two stages:
This is the default when no other options are specified.
Select devices with specified attribute value.
When specified as KEY=VALUE, selects all devices that provide an attribute named KEY with a value of VALUE. When specified as KEY!=VALUE, selects all devices that don't provide an attribute named KEY with a value of VALUE.
The NAME parameter must be the name of an existing networking interface.
The NODE parameter must be the path to a block device or character device special file.
Note: If NODE is the device node for a logical device (such as a device mapper device), lszdev will try to resolve the corresponding physical device nodes. The lsblk(8) tool must be available for this resolution to work.
The PATH parameter can be the mount point of a mounted file system, or a path on that file system.
Note: If the file system that provides PATH is stored on multiple physical devices or on a subvolume (such as supported by btrfs) lszdev will try to resolve the corresponding physical device nodes. The lsblk(8) and findmnt(8) tools must be available and in the case of multiple physical devices the file system must provide a valid UUID for this resolution to work.
An online device is a device in the active configuration that is set up to provide its associated Linux function (such as a block device or networking interface).
An offline device is a device in the active configuration that is not set up to provide its associated Linux function.
A failed device is a device for which its driver detected an error condition that may cause the device to not correctly perform its function. You can use the --info option of the lszdev tool to get more details on the detected errors.
Example: lszdev --failed --info
Select the device used for the most recent IPL operation.
Displays detailed information about the configuration of the selected device or device type. Specifying --info twice will display additional device information.
Lists all available columns for use with option --columns.
Lists the name and a short description for all device types supported by lszdev.
Restricts output to information obtained from the active configuration, that is information from the running system.
Restricts output to information obtained from the auto-configuration. The auto-configuration is the collection of configuration data obtained automatically on some machine models during boot.
Note: This data is refreshed during each boot. Also configuration directives in the auto-configuration only take effect if there is no directive for the same device in the persistent configuration.
If PATH is specified without an equal sign (=), it is used as base path for accessing files in the active and persistent configuration.
If the specified parameter is in KEY=VALUE format, only those paths that begin with KEY are modified. For these paths, the initial KEY portion is replaced with VALUE.
Example: lszdev --persistent --base
/etc=/mnt/etc
You can change the columns shown in list output format by specifying column names as comma-separated list via the --columns option. Note that --columns cannot be specified together with --info.
Example: lszdev --columns TYPE,ID
To get a list of supported column names, use the --list-columns action.
When displaying output in list format, this option can be specified to suppress the output of a heading row.
You can use this option to generate output in a format more suitable for processing by other programs. In this format, column values are prefixed with the name of the corresponding column. Values are enclosed in double quotation marks. Any quotation marks or slashes in the value string are escaped by placing a slash in front of it.
You can use this option together with the --pairs option to generate output that is suitable to be sourced in a shell environment. This option generates similar output as it would be provided by the --pairs option but it would take care of replacing any character of a column name that would not be appropriate to be used as part of a shell variable name by an underscore.
Restricts output to information obtained from configuration files.
The resulted persistent configuration details are filtered based on the value. The site specific information can be found in a basic lszdev output. For example, the PERS column may show "s+" which indicates that the device has multiple configurations for multiple sites, and "sn" where 'n' is an number between 0 to 9, which indicates that the persistent configuration for the device is available only for site 'n'.
Example:
lszdev --site 3
lszdev -i --site 2
lszdev f001 --site 9
Display a list of all devices:
Return type and ID of root device in machine-readable format:
Display DASD driver settings:
Display cryptographic (AP) adapter and domain assignments:
lszdev returns a subset of the exit codes returned by the chzdev tool. See chzdev(8) for the detailed list.
| Jan 2016 | s390-tools |