Host statistics
The following table lists:
- Performance statistics calculations accomplished by the CIM agent
- Respective fields in the statistics file that is reported for individual hosts.
| 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 |
| ReadHitIOs | READ_HITCACHE_TAG |
| ReadIOTimeCounter | READ_TIME_TAG |
| KBytesRead(sizeUnits) | READ_BLOCK_TAG*sizeUnits/1024 |
| WriteIOs | WRITE_OPERATION_TAG |
| WriteHitIOs | WRITE_HITCACHE_TAG |
| WriteIOTimeCounter | WRITE_TIME_TAG |
| KBytesWritten(sizeUnits) | WRITE_BLOCK_TAG*sizeUnits/1024 |
| UnmapOperation | UNMAP_OPERATION_TAG |
| Var | File name | XML field | Description |
|---|---|---|---|
| DEVICE_ID_TAG | Nh_stats | "idx" | Indicates the identifier of the Host for which the statistics apply. |
| READ_OPERATION_TAG | Nh_stats | "ro" | Indicates the cumulative number of Host read operations that were processed (since the node started). |
| WRITE_OPERATION_TAG | Nh_stats | "wo" | Indicates the cumulative number of Host write operations that were processed (since the node started). |
| READ_BLOCK_TAG | Nh_stats | "rb" | Indicates the cumulative number of blocks of data that was read (since the node started). |
| WRITE_BLOCK_TAG | Nh_stats | "wb" | Indicates the cumulative number of blocks of data written (since the node started). |
| READ_TIME_TAG | Nh_stats | "rl" | Indicates the cumulative read response time in milliseconds for each Host. The cumulative response time for Host reads is calculated by starting a timer when a SCSI read command is received and stopped when the command completes successfully. The elapsed time is added to the cumulative counter. |
| WRITE_TIME_TAG | Nh_stats | "wl" | Indicates the cumulative write response time in milliseconds for each Host. The cumulative response time for Host writes is calculated by starting a timer when a SCSI write command is received and stopped when the command completes successfully. The elapsed time is added to the cumulative counter. |
| UNMAP_OPERATION_TAG | Nh_stats | "uo" | Indicates the cumulative number of Host unmap operations that were processed (since the node started) . |
| IDX_TAG | Nh_stats | "idx" | Indicates the identifier of the hoist for which the statistics apply. |
The following code example shows an illustration of the calculations in a scripting form.
Request
def get_latest_sample_host_io_stats(url, username, password):
xml = get_latest_stats(url, username, password)
fields = {
"READ_OPERATION_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "ro",
"value": 0},
"WRITE_OPERATION_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "wo",
"value": 0},
"READ_BLOCK_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "rb",
"value": 0},
"WRITE_BLOCK_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "wb",
"value": 0},
"READ_TIME_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "rl",
"value": 0},
"WRITE_TIME_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "wl",
"value": 0},
"UNMAP_OPERATION_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "uo",
"value": 0},
"IDX_TAG": {
"filename": "Nh_stats",
"element": "host",
"field": "idx",
"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,
'UnmapOperation': fields['UNMAP_OPERATION_TAG']['value'],
'Idx': fields['IDX_TAG']['value']
}
return cimom_fields
pprint.pprint(get_latest_sample_host_io_stats(url, username, password))Response
{'IOTimeCounter': 3379760,
'Idx': 0,
'KBytesRead': 61292040.0,
'KBytesTransferred': 99149574.0,
'KBytesWritten': 37857534.0,
'ReadIOTimeCounter': 296667,
'ReadIOs': 3829553,
'TotalIOs': 6195649,
'UnmapOperation': 0,
'WriteIOTimeCounter': 3083093,
'WriteIOs': 2366096}