lszdev(8) | lszdev | 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.
By default lszdev displays information from both the active and the persistent configuration, and, if available, from the auto-configuration.
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: lszdev dasd 1000,2000-2010
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¶
- --all
- Select all existing and configured devices.
This is the default when no other options are specified.
- --by-attrib KEY=VALUE
- --by-attrib KEY!=VALUE
-
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.
- --by-interface NAME
- Select device providing network interface, e.g. eth0.
The NAME parameter must be the name of an existing networking interface.
- --by-node NODE
- 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.
- --by-path PATH
- 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
ACTIONS¶
- -i
- --info
- Display detailed information.
Displays detailed information about the configuration of the selected device or device type. Specifying --info twice will display additional device information.
- -l
- --list-columns
- List available output columns.
Lists all available columns for use with option --columns.
- -L
- --list-types
- List supported device types.
Lists the name and a short description for all device types supported by lszdev.
OPTIONS¶
- -a
- --active
- List information from the active configuration only.
Restricts output to information obtained from the active configuration, that is information from the running system.
- --auto-conf
- 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.
- --base PATH|KEY=VALUE
- 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
- -c COLUMNS
- --columns COLUMNS
- 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.
- -n
- --no-headings
- Do not print column headings.
When displaying output in list format, this option can be specified to suppress the output of a heading row.
- --pairs
- 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.
- -p
- --persistent
- List information from the persistent configuration only.
Restricts output to information obtained from configuration files.
EXAMPLES¶
Display a list of all devices:
Return type and ID of root device in machine-readable format:
Display DASD driver settings:
EXIT CODES¶
lszdev returns a subset of the exit codes returned by the chzdev tool. See chzdev(8) 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¶
Jan 2016 | s390-tools |