lszdev - Display IBM Z device configurations

6.10 LPAR mode z/VM guest KVM guest

Use the lszdev command to display the configuration of devices and device drivers that are specific to IBM Z®. Supported device types include storage devices (DASD and zFCP) and networking devices (QETH, CTC, and LCS).

Configuration information is taken from three sources: the active configuration of the currently running system, the persistent configuration stored in configuration files, and the auto-configuration from the Support Element (SE). By default, lszdev displays information from all available sources. If no auto-configuration data is displayed, the mainframe model does not support such data, or none has been specified. For details about the auto-configuration, see Device auto-configuration for Linux in LPAR mode.

The lszdev command supports two different views:
  • The list view provides overview information for selected devices in list form with configurable columns (default)
  • The details view provides detailed per-device information

lszdev main syntax

Read syntax diagramSkip visual syntax diagram lszdev Device selectionDevice type selection--persistent --active --auto-conf--active--persistent--auto-conf --info --site<site_id>--columns, <column_name>--no-headings--pairs--base<path><key=value>--quiet--verbose
Device selection
Read syntax diagramSkip visual syntax diagram<type>,<device><from_dev>-<to_dev> --all--by-attrib <key=value> |  <key!=value>--by-interface <interface>--by-node <device_node>--by-path <path> --configured --existing --online--offline
Device type selection
Read syntax diagramSkip visual syntax diagram<type>--type

lszdev help functions

Read syntax diagramSkip visual syntax diagram lszdev --list-types--list-columns--help--version

Where:

<type>
restricts the output to the specified device type. A device type typically corresponds to a device driver. Multiple device types are sometimes provided for the same driver, for example, both "dasd-eckd" and "dasd-fba" are related to the DASD device driver. You can work with types in the following ways:
  • To display data for devices with matching type and ID only, specify a device type and a device ID, for example:
    # lszdev dasd 0.0.8000
  • To display the configuration of the device type itself, specify a device type together with the --type option, for example:
    # lszdev dasd --type
To get a list of supported device types, use the --list-types option.
<device>
limits the output to information about 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 (-). Specify multiple IDs or ID ranges by separating IDs with a comma (,).
--all
lists all existing and configured devices. This option is the default.
--by-attrib <key=value> | <key!=value>
selects devices with a specified attribute, <key> that has a value of <value>. When specified as <key!=value>, lists all devices that do not provide an attribute named <key> with a value of <value>.
Tip: You can use the --list-attributes option to display a list of available attributes and the --help-attribute to get more detailed information about a specific attribute.
--by-interface <interface>
selects devices by network interface, for example, eth0. The <interface> parameter must be the name of an existing networking interface.
--by-node <node>
selects devices by device node, for example, /dev/sda. The <node> 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 tries to resolve the corresponding physical device nodes. The lsblk tool must be available for this resolution to work.
--by-path <path>
selects devices by file-system path, for example, /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 (such as supported by btrfs), lszdev tries to resolve the corresponding physical device nodes. The lsblk tool must be available and the file system must provide a valid UUID for this resolution to work.
--configured
narrows the selection to those devices for which a persistent configuration exists.
--existing
narrows the selection to devices that are present in the active configuration.
--online
narrows the selection to devices that are enabled in the active configuration.
--offline
narrows the selection to devices that are disabled in the active configuration.
-a or --active
lists information obtained from the active configuration, that is, information from the running system.
-p or --persistent
lists information from the persistent configuration.
--auto-conf
lists information from the auto-configuration, see Device auto-configuration for Linux in LPAR mode.
-i or --info
displays detailed information about the configuration of the selected device or device type. Use -ii for even more information.
-s<site_id> or --site <site_id>
displays information that is specific to the site with the specified site ID, <site_id>. The site identifier <site_id> is an integer in the range 0 to 9. For more information about site-specific configurations, see Site-specific Linux instantiation.
-c or --columns <columns>
specifies a comma-separated list of columns to display.
Example:
# lszdev --columns TYPE,ID 
Tip: To get a list of supported column names, use the --list-columns option.
-n or --no-headings
suppresses column headings for list output.
--pairs
produces output in <key="value"> format. 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. The lszdev command automatically escapes quotation marks and slashes that are part of the value string.
--base <path> | <key=value>
changes file system paths that are 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
-t or --type <device_type>
lists information about a device type. Use this option to display configuration information of a device type instead of a device.
-q or --quiet
prints only minimal run-time information.
-V or --verbose
prints additional run-time information.
-L or --list-types
lists all available device types that you can use with the --type option.
-l or --list-columns
lists all available columns that you can use with the --columns option.
-h or --help
displays help information for the command.
-v or --version
displays the version number of lszdev, then exits.

Input files

The lszdev command uses these input files:
/etc/udev/rules.d/
lszdev reads udev rules that represent the persistent configuration of devices from this directory. The udev rules are named 41-<device subtype>-<id>.rules.
/etc/modprobe.d/
lszdev reads modprobe configuration files that represent the persistent configuration of certain device types from this directory. File names start with s390x-.
/usr
lszdev reads udev rules that represent the auto-configuration of devices from this directory.

Examples

  • To display a list of all devices:
    # lszdev
  • To return type and ID of root device in machine-readable format:
    # lszdev --columns TYPE,ID --by-path /
  • To display DASD driver settings:
    # lszdev --type dasd