Reading data
![]()
Read the sysfs attributes with collected I/O data, for example with the cat command.
Procedure
While data collection is enabled for a device, the directories that represent it in sysfs contain a subdirectory, cmf, with several read-only attributes. These attributes hold the collected data.
To read one of the attributes, issue a command of this
form:
# cat /sys/bus/ccw/devices/<device_bus_id>/cmf/<attribute>
where /sys/bus/ccw/devices/<device_bus_id> is the directory that represents the device, and <attribute> the attribute to be read. Table 1 summarizes the available attributes.
| Attribute | Value |
|---|---|
| ssch_rsch_count | An integer that represents the ssch rsch count value. |
| sample_count | An integer that represents the sample count value. |
| avg_device_connect_time | An integer that represents the average device connect time, in nanoseconds, per sample. |
| avg_function_pending_time | An integer that represents the average function pending time, in nanoseconds, per sample. |
| avg_device_disconnect_time | An integer that represents the average device disconnect time, in nanoseconds, per sample. |
| avg_control_unit_queuing_time | An integer that represents the average control unit queuing time, in nanoseconds, per sample. |
| avg_initial_command_response_time | An integer that represents the average initial command response time, in nanoseconds, per sample. |
| avg_device_active_only_time | An integer that represents the average device active only time, in nanoseconds, per sample. |
| avg_device_busy_time | An integer that represents the average value device busy time, in nanoseconds, per sample. |
| avg_utilization | A percent value that represents the fraction of time that was spent in device connect time, plus function pending time, plus device disconnect time during the measurement period. |
| avg_sample_interval | An integer that represents the average time,
in nanoseconds, between two samples during the measurement period.
Can be -1if no measurement data was collected. |
| avg_initial_command_response_time | An integer that represents the average time in nanoseconds between the first command of a channel program being sent to the device and the command being accepted. Available in extended format only. |
| avg_device_busy_time | An integer that represents the average time in nanoseconds of the subchannel being in the "device busy" state when initiating a start or resume function. Available in extended format only. |
Example
To read the avg_device_busy_time attribute for a device
/sys/bus/ccw/devices/0.0.b100: # cat /sys/bus/ccw/devices/0.0.b100/cmf/avg_device_busy_time
21