Disk (drive) statistics

The following table lists:
  • Performance statistics calculations accomplished by the CIM agent
  • Respective fields in the statistics file that is reported for individual drives.
Table 1. Calculations
CIMOM field Calculation
deviceId DEVICE_ID_TAG
TotalIOs READ_OPERATION_TAG + WRITE_OPERATION_TAG
KBytesTransferred(sizeUnits) (READ_BLOCK_TAG + WRITE_BLOCK_TAG)*sizeUnits/1024
IOTimeCounter READ_TIME_TAG + WRITE_TIME_TAG
ReadIOs READ_OPERATION_TAG
ReadIOTimeCounter READ_TIME_TAG
KBytesRead(sizeUnits) READ_BLOCK_TAG*sizeUnits/1024
WriteIOs WRITE_OPERATION_TAG
WriteIOTimeCounter WRITE_TIME_TAG
KBytesWritten(sizeUnits) WRITE_BLOCK_TAG*sizeUnits/1024
Var File name XML field Description
DEVICE_ID_TAG Nd_stats "idx" Indicates the name of the MDisk for which the statistics apply
READ_OPERATION_TAG Nd_stats "ro" Indicates the cumulative number of MDisk read operations that were processed (since the node started)
WRITE_OPERATION_TAG Nd_stats "wo" Indicates the cumulative number of MDisk write operations that were processed (since the node started)
READ_BLOCK_TAG Nd_stats "rb" Indicates the cumulative number of blocks of data that was read (since the node started).
WRITE_BLOCK_TAG Nd_stats "wb" Indicates the cumulative number of blocks of data written (since the node started)
READ_TIME_TAG Nd_stats "re" Indicates the cumulative read external response time in milliseconds for each MDisk. The cumulative response time for disk reads is calculated by starting a timer when a SCSI read command is issued and stopped when the command completes successfully. The elapsed time is added to the cumulative counter
WRITE_TIME_TAG Nd_stats "we" Indicates the cumulative write external response time in milliseconds for each MDisk. The cumulative response time for disk writes is calculated by starting a timer when a SCSI write command is issued and stopped when the command completes successfully. The elapsed time is added to the cumulative counter

The following code example shows an illustration of the calculations in a scripting form.

Request
def get_latest_cimom_sample_drive_stats(url, username, password):
    xml = get_latest_stats(url, username, password)
 
    fields = {
        "READ_OPERATION_TAG": {
            "filename": "Nd_stats",
            "element": "mdsk",
            "field": "ro",
            "value": 0},
        "WRITE_OPERATION_TAG": {
            "filename": "Nd_stats",
            "element": "mdsk",
            "field": "wo",
            "value": 0},
        "READ_BLOCK_TAG": {
            "filename": "Nd_stats",
            "element": "mdsk",
            "field": "rb",
            "value": 0},
        "WRITE_BLOCK_TAG": {
            "filename": "Nd_stats", 
            "element": "mdsk",
            "field": "wb",
            "value": 0},
        "READ_TIME_TAG": {
            "filename": "Nd_stats",
            "element": "mdsk",
            "field": "re",
            "value": 0},
        "WRITE_TIME_TAG": {
            "filename": "Nd_stats", 
            "element": "mdsk",
            "field": "we",
            "value": 0}
    }
    populate_fields(xml, fields)
    cimom_fields = {
        'TotalIOs': fields['READ_OPERATION_TAG']['value'] + fields['WRITE_OPERATION_TAG']['value'],
        'KBytesTransferred': (fields['READ_BLOCK_TAG']['value'] + fields['WRITE_BLOCK_TAG']['value']) * 1024 / 1024,
        'IOTimeCounter': fields['READ_TIME_TAG']['value'] + fields['WRITE_TIME_TAG']['value'],
        'ReadIOs': fields['READ_OPERATION_TAG']['value'],
        'ReadIOTimeCounter': fields['READ_TIME_TAG']['value'],
        'KBytesRead': fields['READ_BLOCK_TAG']['value'] * 1024 / 1024,
        'WriteIOs': fields['WRITE_OPERATION_TAG']['value'],
        'WriteIOTimeCounter': fields['WRITE_TIME_TAG']['value'],
        'KBytesWritten': fields['WRITE_BLOCK_TAG']['value'] * 1024 / 1024
   
    }
    return cimom_fields
 
pprint.pprint(get_latest_cimom_sample_drive_stats(url, username, password))
Response
{'IOTimeCounter': 409969,
'KBytesRead': 356062720.0,
'KBytesTransferred': 356064872.0,
'KBytesWritten': 2152.0,
'ReadIOTimeCounter': 409940,
'ReadIOs': 695437,
'TotalIOs': 695451,
'WriteIOTimeCounter': 29,
'WriteIOs': 14}