Viewing the configuration

SUSE Linux Enterprise Server 15 SP5 LPAR mode z/VM guest KVM guest

Use the lszdev command to list information about device drivers, devices, device types, and attributes.

About this task

The lszdev command provides options for extracting information from the active and persistent system configuration. You can list and get help on available device attributes and list available device types.
Read syntax diagramSkip visual syntax diagramlszdevDevice or device type selection --info--site <site_id> --columns  , columns --no-headings --pairs --base  <path> | <key=value>

where:

-i or --info
displays detailed information about the configuration of the selected device or device type. Use -ii for even more information.
-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

The following examples assume that no site-specific configuration is available for the listed devices.
  • 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   eth2
    ctc         0.0.c000:0.0.c001          no  no
    ctc         0.0.c002:0.0.c003          no  no
    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   eth0
  • 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="eth0"
  • 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    eth0          1
  • To get a list of supported device types, use the --list-types option:
    # 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
    Some device types are related. For example, specifying the "dasd" device type will select both "dasd-eckd" and "dasd-fba" devices.
  • To list configuration details for a device, use the --info option:
    # lszdev --info --by-interface eth0
    DEVICE qeth 0.0.f5f0:0.0.f5f1:0.0.f5f2
    Names      : eth0
    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"             -
The following example includes two devices with site-specific configurations.
  • # lszdev
    TYPE       ID                          ON  PERS  NAMES
    dasd-eckd  0.0.f001                    no  s+    dasda
    dasd-eckd  0.0.f002                    no  s4    dasdb
    dasd-eckd  0.0.f003                    no  no    dasdc
    qeth       0.0.1200:0.0.1201:0.0.1202  no  yes   encbdf0
    The s4 in the PERS output column indicates that a site-specific configuration is available for the DASD for site 4. The s+ indicates that site-specific configurations are available for the DASD for multiple sites.
  • To list the devices with site-specific configurations for site 3, specify this site with the --site option:
    # lszdev --site 3
    TYPE       ID        PERS
    dasd-eckd  0.0.f001  s3
    dasd-eckd  0.0.fffd  s3
  • To display the configuration of device 0.0.f001 for site 3, specify the device ID and use both the --site option and the --info option:
    # lszdev 0.0.f001 --info --site 3
    DEVICE dasd-eckd 0.0.f001
      Names              : dasda
      Block devices      : dasda
      Modules            : dasd_eckd_mod dasd_mod
      Online             : yes
      Exists             : yes
      Persistent         : yes
      Sites              : 1,2,3
    
      ATTRIBUTE   SITE3
      cmb_enable  -
      online      "1"
    For device 0.0.f001, site-specific configuration is also available for sites 1 and 2.
  • To display the configuration of device 0.0.f007 across sites:
    # lszdev -i f007 
    DEVICE dasd-eckd 0.0.f007
      Names              : -
      Modules            : dasd_eckd_mod dasd_mod
      Online             : no
      Exists             : no
      Persistent         : yes
      Sites              : 0,1,4
    
      ATTRIBUTE   ACTIVE  PERSISTENT  SITE0  SITE1  SITE4
      cmb_enable  -       "1"         -      -      "0"
      online      -       "1"         "0"    "1"    "1"