Displaying information about cryptographic devices

Use the lszcrypt command to display status information about your cryptographic devices; alternatively, you can use sysfs.

About this task

Each cryptographic adapter is represented in sysfs directory of the form
/sys/bus/ap/devices/card<XX>
where <XX> is the two-digit device index for each device. For example, device 0x1a can be found under /sys/bus/ap/devices/card1a. The sysfs directory contains a number of attributes with information about the cryptographic adapter.
Table 1. Cryptographic adapter attributes
Attribute Explanation
ap_functions Read-only attribute that represents the function facilities that are installed on this device.
depth Read-only attribute that represents the input queue length for this device.
hwtype Read-only attribute that represents the numeric hardware type for this device. The following values are defined:
8
CEX3A adapters.
9
CEX3C adapters.
10
CEX4A, CEX4C, or CEX4P adapters.
11
CEX5A, CEX5C, or CEX5P adapters.
12
CEX6A, CEX6C, or CEX6P adapters.
The hwtype attribute shows the hardware type as interpreted by the device driver. For example, any cryptographic adapter later than CEX6 might be shown as a CEX6 adapter (type 12). See also the raw_hwtype attribute.
raw_hwtype Read-only attribute that represents the original hardware type of the cryptographic adapter.
modalias Read-only attribute that represents an internally used device bus-ID.
online Read-write attribute that shows whether the device is online (1) or offline (0).
pendingq_count Read-only attribute that represents the number of requests in the hardware queue.
request_count Read-only attribute that represents the number of requests that are already processed by this device.
requestq_count Read-only attribute that represents the number of outstanding requests (not including the requests in the hardware queue).
type Read-only attribute with a name for the device type. The following types are defined:
  • CEX3A, CEX3C
  • CEX4A, CEX4C, CEX4P
  • CEX5A, CEX5C, CEX5P
  • CEX6A, CEX6C, CEX6P
Each AP queue is independently configurable and represented in a subdirectory of the cryptographic device it belongs to:
/sys/bus/ap/devices/card<XX>/<XX>.<YYYY>
where <XX> is the adapter ID of the cryptographic device and <YYYY> is the domain. For example, a cryptographic device with adapter ID 1a might have domains 5 (0005), 31 (001f), and 77 (004d) configured. The cryptographic device together with its AP queues would be represented in sysfs as:
/sys/devices/ap/card1a   
/sys/devices/ap/card1a/1a.0005
/sys/devices/ap/card1a/1a.001f
/sys/devices/ap/card1a/1a.004d

Actions that you take on the cryptographic device also apply to its associated AP queues. Attributes like type and hwtype are inherited by the AP queues. The sysfs directory contains a number of attributes with information about the AP queues.

Table 2. Attributes of the AP queues
Attribute Explanation
online Read-write attribute that shows whether the AP queue is online (1) or offline (0).
interrupt Read-only attribute that represents the interrupt state (enabled or disabled) of the AP queue, and hence the request queue.
reset Read-only attribute that indicate the state of pending resets of the AP queues, and hence the request queue.
pendingq_count Read-only attribute that represents the number of requests in the hardware queue.
request_count Read-only attribute that represents the number of requests that are already processed by this AP queue.
requestq_count Read-only attribute that represents the number of outstanding requests (not including the requests in the hardware queue).

To display status information about your cryptographic devices, you can also use the lszcrypt command.