Viewing the configuration
Use the lszdev command to list information about device drivers, devices, device types, and attributes.
About this task
where:
- -i or --info
- displays detailed information about the configuration of the selected device or device type.
- -c <columns> 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
Examples
- To list devices with their status, use the lszdev command,
issue:
# lszdev TYPE ID ON PERS NAMES dasd-eckd 0.0.0190 no no dasd-eckd 0.0.3718 yes yes dasda dasda1 dasd-eckd 0.0.3719 no no dasd-eckd 0.0.371a yes yes dasdb dasdb1 dasdb2 dasdb3 dasd-fba 0.0.8000 no no zfcp-host 0.0.1940 no no zfcp-host 0.0.1941 no no qeth 0.0.a000:0.0.a001:0.0.a002 no no qeth 0.0.a003:0.0.a004:0.0.a005 no no qeth 0.0.f500:0.0.f501:0.0.f502 no no qeth 0.0.f503:0.0.f504:0.0.f505 no no qeth 0.0.f5f0:0.0.f5f1:0.0.f5f2 yes yes encf5f0 generic-ccw 0.0.0009 yes no generic-ccw 0.0.000c no no generic-ccw 0.0.000d no no generic-ccw 0.0.000e no no
- To restrict output to a single device type,
issue:
# lszdev qeth TYPE ID ON PERS NAMES qeth 0.0.a000:0.0.a001:0.0.a002 no no qeth 0.0.a003:0.0.a004:0.0.a005 no no qeth 0.0.f500:0.0.f501:0.0.f502 no no qeth 0.0.f503:0.0.f504:0.0.f505 no no qeth 0.0.f5f0:0.0.f5f1:0.0.f5f2 yes yes encf5f0
- To list output in machine-readable format, use the --pairs option,
issue:
# lszdev qeth --pairs TYPE="qeth" ID="0.0.a000:0.0.a001:0.0.a002" ON="no" PERS="no" NAMES="" TYPE="qeth" ID="0.0.a003:0.0.a004:0.0.a005" ON="no" PERS="no" NAMES="" TYPE="qeth" ID="0.0.f500:0.0.f501:0.0.f502" ON="no" PERS="no" NAMES="" TYPE="qeth" ID="0.0.f503:0.0.f504:0.0.f505" ON="no" PERS="no" NAMES="" TYPE="qeth" ID="0.0.f5f0:0.0.f5f1:0.0.f5f2" ON="yes" PERS="yes" NAMES="encf5f0
- To list all columns that you can display, use the --list-columns
option:
# lszdev --list-columns COLUMN DESCRIPTION TYPE Device type ID Device identifier ON Device is online in the active configuration EXISTS Device exists in the active configuration PERS Device is configured persistently NAMES Associated Linux device names BLOCKDEVS Associated block devices CHARDEVS Associated character devices NETDEVS Associated network interfaces MODULES Required kernel modules ATTR: Value of specific attribute, e.g. ATTR:online
- To display specific columns only, use the --columns option with the names of
the columns as a comma-separated
list:
# lszdev qeth --columns ID,NAMES,ATTR:layer2 ID NAMES ATTR:layer2 0.0.a000:0.0.a001:0.0.a002 0 0.0.a003:0.0.a004:0.0.a005 0 0.0.f500:0.0.f501:0.0.f502 1 0.0.f503:0.0.f504:0.0.f505 0 0.0.f5f0:0.0.f5f1:0.0.f5f2 encf5f0 1
- To get a list of supported device types, use the --list-types
option:
Some device types are related. For example, specifying the "dasd" device type will select both "dasd-eckd" and "dasd-fba" devices.# lszdev --list-types TYPE DESCRIPTION dasd FICON-attached Direct Access Storage Devices (DASDs) dasd-eckd Enhanced Count Key Data (ECKD) DASDs dasd-fba Fixed Block Architecture (FBA) DASDs zfcp SCSI-over-Fibre Channel (FCP) devices and SCSI devices zfcp-host FCP devices zfcp-lun zfcp-attached SCSI devices qeth OSA-Express and HiperSockets network devices ctc Channel-To-Channel (CTC) and CTC-MPC network devices lcs LAN-Channel-Station (LCS) network devices generic-ccw Generic Channel-Command-Word (CCW) devices
- To list configuration details for a device, use the --info
option:
# lszdev --info --by-interface encf5f0 DEVICE qeth 0.0.f5f0:0.0.f5f1:0.0.f5f2 Names : encf5f0 Modules : qeth Online : yes Exists : yes Persistent : yes ATTRIBUTE ACTIVE PERSISTENT buffer_count "64" - hw_trap "disarm" - isolation "none" - layer2 "1" "1" online "1" "1" performance_stats "0" - portname "" - portno "0" - priority_queueing "always queue 0" -
- To list configuration details for a device driver, use the --type and a
device-type
name:
# lszdev --type dasd DEVICE TYPE dasd Description : FICON-attached Direct Access Storage Devices (DASDs) Modules : dasd_mod dasd_eckd_mod dasd_fba_mod Active : yes Persistent : no ATTRIBUTE ACTIVE PERSISTENT autodetect "0" - dasd - - eer_pages "5" - nofcx "0" - nopav "0" - probeonly "0" -