lszdev(8)

NAME
lszdev - Display configuration of z Systems specific devices

SYNOPSIS
lszdev [ TYPE DEVICE SELECTION ACTIONS OPTIONS ]

DESCRIPTION
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.

  Configurations
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.

  Output Format
In list format, lszdev uses values with the following meaning for the persistent columns (PERS): yes no auto s<n> s+ Example

TYPE
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:

•   Specify a device type and optionally a device ID to only display data for devices with matching type and ID

•   Specify a device type together with the --type option to display the configuration of the device type itself

To get a list of supported device types, use the --list-types action.

DEVICE
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:

SELECTION
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:

online
    The device is enabled and set up to provide a Linux function such as a block device like /dev/dasda, or a networking interface like eth0.

offline
    The device is not enabled.

existing
    The device is present in the active configuration.

configured
    There is a persistent configuration for this device.

failed
    The driver of a device detected errors that may cause the device to not function properly.

Selection works in two stages:

1.  All devices specified by ID or by options --all, --by-interface, --by-node or --by-path are considered for selection.

2.  Of the considered devices, only those matching the specified state options --online, --offline, --existing, --configured and --failed are selected.

  Selection options
Select all existing and configured devices. 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.

Select device providing network interface, e.g. eth0. The NAME parameter must be the name of an existing networking interface.

Select device providing device node, e.g. /dev/sda. 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 tool must be available for this resolution to work.

Select device providing file system path, e.g. /usr. 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 and 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.

Select all devices for which a persistent configuration exists.

Select all devices that are present in the active configuration.

Select devices that are online. 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).

Select devices that are offline. An offline device is a device in the active configuration that is not set up to provide its associated Linux function.

Select devices for which errors were detected. 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:

ACTIONS
Print usage information, then exit.

Display detailed information. Displays detailed information about the configuration of the selected device or device type. Specifying --info twice will display additional device information.

List available output columns. Lists all available columns for use with option --columns.

List supported device types. Lists the name and a short description for all device types supported by lszdev.

Print version information, then exit.

OPTIONS
List information from the active configuration only. Restricts output to information obtained from the active configuration, that is information from the running system.

List information from the auto-configuration only. 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.

Change file system paths used to access files. 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:

Specify comma-separated list of columns to display. 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: To get a list of supported column names, use the --list-columns action.

Do not print column headings. When displaying output in list format, this option can be specified to suppress the output of a heading row.

Produce output in KEY="VALUE" format. 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.

Produces KEY="VALUE" format usable as shell variables. 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.

List information from the persistent configuration only. Restricts output to information obtained from configuration files. Print only minimal run-time information.

List the persistent configuration from the specified site only. 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:

List information about device type. Use this option to display configuration information of a device type instead of a device.

Print additional run-time information.

EXAMPLES
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:

EXIT CODES
lszdev returns a subset of the exit codes returned by the chzdev tool. See for the detailed list.

FILES

/etc/udev/rules.d/
    lszdev reads udev rules representing the persistent configuration of devices from this directory. File names start with "41-".

/etc/modprobe.d/
    chzdev reads modprobe configuration files representing the persistent configuration of certain device types from this directory. File names start with "s390x-".

SEE ALSO