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:
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
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.
Restricts output to information obtained from configuration files.
Display a list of all devices:
Return type and ID of root device in machine-readable format:
Display DASD driver settings:
lszdev returns a subset of the exit codes returned by the chzdev tool. See chzdev(8) for the detailed list.
Jan 2016 | s390-tools |