DOKK / manpages / debian 12 / s390-tools / lszdev.8.en
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.

By default lszdev displays information from both the active and the persistent configuration, and, if available, from the auto-configuration.

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.

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:

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.
The device is not enabled.
The device is present in the active configuration.
There is a persistent configuration for this device.
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.

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 lsblk(8) 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 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.

--configured
Select all devices for which a persistent configuration exists.

--existing
Select all devices that are present in the active configuration.

--online
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).

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

--failed
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: lszdev --failed --info

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.

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: lszdev --persistent --base /etc=/mnt/etc

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: lszdev --columns TYPE,ID

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.

List information from the persistent configuration only.

Restricts output to information obtained from configuration files.

Print only minimal run-time information.

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.

Display a list of all devices:

lszdev

Return type and ID of root device in machine-readable format:

lszdev --columns TYPE,ID --by-path /

Display DASD driver settings:

lszdev --type dasd

lszdev returns a subset of the exit codes returned by the chzdev tool. See chzdev(8) for the detailed list.

/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-".

chzdev(8), lsdasd(8), lszfcp(8), lsqeth(8), lsblk(8).

Jan 2016 s390-tools