zcryptstats - Display crypto statistics

Red Hat Enterprise Linux 8.6 LPAR mode

Use the zcryptstats command to report cryptographic performance measurement data for cryptographic devices at specified intervals.

Device node /dev/chsc must exist. Load the chsh_sch kernel module with modprobe chsc_sch to make device node /dev/chsc available.

zcryptstats syntax

Read syntax diagramSkip visual syntax diagramzcryptstats -i 10 -i<time>-c<no.> -t-T-oJSONTABLECSV-M <mapping>-A -O  <device_ID>
Where:
-i or --interval <time>
specifies the time interval between reports in seconds. The default is 10 seconds.
-c or --count <no.>
specifies the number of reports to be generated. By default the zcryptstats command keeps generating reports until it is stopped with Ctrl+C.
-o or --output JSON|TABLE|CSV

displays the statistics in the specified format. By default, a comprehensive report is displayed in a human readable format. Supported output formats are: JSON, TABLE, or CSV.

With TABLE and CSV, only the totals are displayed, that is, TABLE and CSV formats imply the --only-totals option.

With JSON or the default display, you can optionally specify one of the --only-totals or -no-totals options.

-t or --no-totals
omits the totals of all counters of a cryptographic adapter (CARD) or queue device (APQN). This option cannot be specified together with the --only-totals option or the --output TABLE | CSV option.
-T or --only-totals
omits the individual counters of a cryptographic adapter or a queue device. This option is implied with the --output TABLE | CSV option.
-a or --no-apqn
displays only the counters of the cryptographic adapter, but omits the counters of the queue device. This option is implied for mainframes before the October 2018 upgrade of IBM z14.
-M or --map-type <mapping>
maps unknown cryptographic device types and modes to known types and modes. Use this option only when new, unknown cryptographic devices are found. You can map unknown devices to known devices and modes, if the new device reports the same counters as the known device. Specify the mapping as a comma-separated list of FROM-TYPE:FROM-MODE=TO-TYPE:TO-MODE specifications. The type and mode values must be specified in decimal notation.
-A or --all
displays all adapter devices and queue devices, not only those devices that are available to the LPAR in which Linux runs. Using this option, additional cryptographic devices that are available in the CEC are also monitored. This option cannot be specified together with the --only-online option.
-O or --only-online
displays only online cryptographic adapters and queue devices. This option cannot be specified together with the --all option.
-V or --verbose
displays additional information messages during processing.
-h or --help
displays help information for the command. To view the man page, enter man zcryptstats.
-v or --version
displays version information for the command.
<device_ID>

List of cryptographic device IDs, separated by blanks, for which statistics are displayed. Device IDs can either be cryptographic adapter IDs or queue device IDs (<adapter_ID>.<domain_ID>). To filter all devices according to a dedicated domain, provide .<domain_ID>. If no IDs are given, all available devices are displayed.

Examples

  • To display statistics for the cryptographic adapter with ID 0x02.
    # zcryptstats 02
  • Display statistics for domain 0x0005 on adapter 0x02 (APQN 02.0005).
    # zcryptstats 02.0005
  • Example of output in default display format:
    # zcryptstats 06
    Linux <version> <system> 16/03/20 s390x
    ********************************************************************
    TIME: 16/03/20 10:48:34 INTERVAL: 1
    
    DEVICE        TYPE                              TIMESTAMP
    --------------------------------------------------------------------
    06       CARD CEX7A (Accelerator)               16/03/20 10:48:34
        COUNTER                   OPS         RATE  UTILIZATION    AVG.DURATION
        -----------------------------------------------------------------------
        RSA 1024 ME                 0         0.00       0.00 %      0.000 usec
        RSA 2048 ME              4149      4148.81      17.46 %     42.074 usec
        RSA 1024 CRT                0         0.00       0.00 %      0.000 usec
        RSA 2048 CRT             4564      4563.79      82.12 %    179.943 usec
        RSA 4096 ME                 0         0.00       0.00 %      0.000 usec
        RSA 4096 CTR                0         0.00       0.00 %      0.000 usec
        -----------------------------------------------------------------------
        Total                    8713      8712.60      99.58 %    114.292 usec
    
    DEVICE        TYPE                              TIMESTAMP           
    --------------------------------------------------------------------
    06.0011 APQN  CEX7A (Accelerator)               16/01/20 10:48:34   
    
            COUNTER                   OPS         RATE  UTILIZATION    AVG.DURATION
            -----------------------------------------------------------------------
            RSA 1024 ME                 0         0.00       0.00 %      0.000 usec
            RSA 2048 ME              2166      2165.90      10.06 %     46.428 usec
            RSA 1024 CRT                0         0.00       0.00 %      0.000 usec
            RSA 2048 CRT             1302      1301.94      23.31 %    179.071 usec
            RSA 4096 ME                 0         0.00       0.00 %      0.000 usec
            RSA 4096 CTR                0         0.00       0.00 %      0.000 usec
            -----------------------------------------------------------------------
            Total                    3468      3467.84      33.37 %     96.226 usec
    
    DEVICE        TYPE                              TIMESTAMP           
    --------------------------------------------------------------------
    06.0023 APQN  CEX7A (Accelerator)               16/03/20 10:48:34   
    ...
  • Example of the same output in TABLE format:
    Linux <version> <system> 16/01/20 s390x
    TIMESTAMP            DEVICE        OPS         RATE  UTILIZATION    AVG.DURATION
    ---------------------------------------------------------------------------------
    16/03/20 10:48:34    06           8713      8712.60      99.58 %    114.292 usec
    16/03/20 10:48:34    06.0011      3468      3467.84      33.37 %     96.226 usec
    16/03/20 10:48:34    06.0023      3267      3266.85      30.15 %     92.278 usec
    16/03/20 10:48:34    06.0024      1978      1977.91      36.06 %    182.325 usec
    ....
  • Example of the same output in CSV format:
    TIMESTAMP,DEVICE,OPS,RATE,UTILIZATION,AVG.DURATION
    16/03/20 10:48:34,06,8713,8712.60,99.58 %,0.000114292
    16/03/20 10:48:34,06.0011,3468,3467.84,33.37 %,0.000096226
    16/03/20 10:48:34,06.0023,3267,3266.85,30.15 %,0.000092278
    16/03/20 10:48:34,06.0024,1978,1977.91,36.06 %,0.000182325
    ....
  • Example of the same output in JSON format:
    {"zcryptstats": {
      "host": {
        "nodename": "lpar01", 
        "sysname": "Linux",
        "release": "5.4",
        "machine": "s390x",
        "date": "16/03/20",
        "statistics": [
          {  
            "interval": 1, "timestamp": "16/01/20 10:48:34", "devices": [
              {"device": "06", "type": "CEX7A (Accelerator)",
               "counters": [
                {"counter": "RSA 1024 ME", "ops": 0, "rate": 0.00,
                 "utilization": 0.00, "duration": 0.000000000}, 
                {"counter": "RSA 2048 ME", "ops": 4149, "rate": 4148.81,
                 "utilization": 17.46, "duration": 0.000042074},
                {"counter": "RSA 1024 CRT", "ops": 0, "rate": 0.00,
                 "utilization": 0.00, "duration": 0.000000000},
                {"counter": "RSA 2048 CRT", "ops": 4564, "rate": 4563.79,
                 "utilization": 82.12, "duration": 0.000179943},
                {"counter": "RSA 4096 ME", "ops": 0, "rate": 0.00,
                 "utilization": 0.00, "duration": 0.000000000},
                {"counter": "RSA 4096 CTR", "ops": 0, "rate": 0.00,
                 "utilization": 0.00, "duration": 0.000000000},
                {"counter": "Total", "ops": 8713, "rate": 8712.60,
                 "utilization": 99.58, "duration": 0.000114292}
              ]},
            {"device": "06.0011", "type": "CEX7A (Accelerator)",
             "counters": [
    ....