4.14 HostDiskTotalLatency

Use this Knowledge Script to monitor the total latency of all disks connected to a host. This script monitors and collects data for the following disk latency performance metrics:

  • Disk command latency: Average amount of time taken during the collection interval to process a SCSI (Small Computer System Interface) command.

  • Disk read latency: Average amount of time taken during the collection interval to process a SCSI read command.

  • Disk write latency: Average amount of time taken during the collection interval to process a SCSI write command.

  • Physical device command latency: Average amount of time, in milliseconds, to complete a SCSI command from the physical device.

  • Physical device read latency: Average amount of time, in milliseconds, to complete read from the physical device.

  • Physical device write latency: Average amount of time, in milliseconds, to write to the physical device.

  • Kernel disk command latency: Average amount of time, in milliseconds, spent by VMkernel processing each SCSI command.

  • Kernel disk read latency: Average amount of time, in milliseconds, spent by VMKernel processing each SCSI read command.

  • Kernel disk write latency: Average amount of time, in milliseconds, spent by VMKernel processing each SCSI write command.

  • Queue command latency: Average amount of time spent in the VMkernel queue, per SCSI command, during the collection interval.

  • Queue read latency: Average amount of time taken during the collection interval per SCSI read command in the VMKernel queue.

  • Queue write latency: Average amount time taken during the collection interval per SCSI write command in the VMKernel queue.

  • Commands: Number of SCSI commands issued during the collection interval.

  • Aborted commands: Number of SCSI commands aborted during the collection interval.

  • Bus resets: Number of SCSI bus reset commands issued during the collection interval.

NOTE:

  • When a host goes into maintenance mode all host scripts, except for the VirtualCenter_HostConnected Knowledge Script, suppress events and data.

  • In rare situations, queries to the ESX host might fail with timeouts because the ESX host stops responding. This issue affects all VirtualCenter_Host* Knowledge Scripts. You can work around this issue by restarting the management service on the ESX host.

  • If you do any of the following, rescan the host bus adapters (HBAs) to ensure the vCenter inventory is up-to-date:

    • Make changes to storage disks or logical unit numbers (LUNs) available to your ESX system

    • Make changes to storage adapters

    • Create a new datastore or remove an existing one

    • Reconfigure an existing datastore, for example when you add a new extent

    After completing the rescan, restart the HostDiskTotalLatency job or wait 24 hours for it to repopulate its storage adapter cache.

4.14.1 Resource Object

vSphere ESX or ESXi host

4.14.2 Default Schedule

By default, this script runs Every 15 minutes.

4.14.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Job Failure Notification

Raise event when latency metrics are not available?

Select Yes to raise an event when latency metrics are not available. The default is unselected.

Event severity when latency metrics are not available

Set the event severity level, from 1 to 40, to indicate the importance of an event in which latency metrics are not available. The default is 15.

Event severity when AppManager failed to get metrics

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to get metrics. The default is 15.

Event severity when AppManager failed to log in

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to log in. The default is 5.

Event severity when HostDiskTotalLatency job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the HostDiskTotalLatency job fails unexpectedly. The default is 5.

Additional Settings

Event Details

Event detail format

Select either HTML Table or Plain Text as the format for event detail. The default is HTML Table.

Monitor Disk Latency

Event Notification

Raise event if disk command latency exceeds the threshold?

Select Yes to raise an event if disk command latency exceeds the threshold you set. The default is Yes.

Threshold -- Maximum disk command latency

Specify the maximum disk command latency that can occur before an event is raised. The default is 10 milliseconds.

Event severity when disk command latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which disk command latency exceeds the threshold. The default is 15.

Raise event if disk read latency exceeds the threshold?

Select Yes to raise an event if disk read latency exceeds the threshold you set. The default is Yes.

Threshold -- Maximum disk read latency

Specify the maximum disk read latency that can occur before an event is raised. The default is 10 milliseconds.

Event severity when disk read latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which disk read latency exceeds the threshold. The default is 15.

Raise event if disk write latency exceeds the threshold?

Select Yes to raise an event if disk write latency exceeds the threshold you set. The default is Yes.

Threshold -- Maximum disk write latency

Specify the maximum disk write latency that can occur before an event is raised. The default is 10 milliseconds.

Event severity when disk write latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which disk write latency exceeds the threshold. The default is 15.

Data Collection

Collect data for disk command latency?

Select Yes to collect disk command latency data for charts and reports. The default is unselected.

Collect data for disk read latency?

Select Yes to collect disk read latency data for charts and reports. The default is unselected.

Collect data for disk write latency?

Select Yes to collect disk write latency data for charts and reports. The default is unselected.

Monitor Physical Device Latency

Event Notification

Raise event if physical device command latency exceeds the threshold?

Select Yes to raise an event if physical device command latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum physical device command latency

Specify the maximum physical device command latency that can occur before an event is raised. The default is 15 milliseconds.

Event severity when physical device command latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which physical device command latency exceeds the threshold. The default is 15.

Raise event if physical device read latency exceeds the threshold?

Select Yes to raise an event if physical device read latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum physical device read latency

Specify the maximum physical device read latency that can occur before an event is raised. The default is 10 milliseconds.

Event severity when physical device read latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which physical device read latency exceeds the threshold. The default is 15.

Raise event if physical device write latency exceeds the threshold?

Select Yes to raise an event if physical device write latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum physical device write latency

Specify the maximum physical device write latency that can occur before an event is raised. The default is 10 milliseconds.

Event severity when physical device write latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which physical device write latency exceeds the threshold. The default is 15.

Data Collection

Collect data for physical device command latency?

Select Yes to collect physical device command latency data for charts and reports. The default is unselected.

Collect data for physical device read latency?

Select Yes to collect physical device read latency data for charts and reports. The default is unselected.

Collect data for physical device write latency?

Select Yes to collect physical device write latency data for charts and reports. The default is unselected.

Monitor Kernel Disk Latency

Event Notification

Raise event if kernel disk command latency exceeds the threshold?

Select Yes to raise an event if kernel disk command latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum kernel disk command latency

Specify the maximum kernel disk command latency that can occur before an event is raised. The default is 4 milliseconds.

Event severity when kernel disk command latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which kernel disk command latency exceeds the threshold. The default is 15.

Raise event if kernel disk read latency exceeds the threshold?

Select Yes to raise an event if kernel disk read latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum kernel disk read latency

Specify the maximum kernel disk read latency that can occur before an event is raised. The default is 2 milliseconds.

Event severity when kernel disk read latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which kernel disk read latency exceeds the threshold. The default is 15.

Raise event if kernel disk write latency exceeds the threshold?

Select Yes to raise an event if kernel disk write latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum kernel disk write latency

Specify the maximum kernel disk write latency that can occur before an event is raised. The default is 2 milliseconds.

Event severity when kernel disk write latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which kernel disk write latency exceeds the threshold. The default is 15.

Data Collection

Collect data for kernel disk command latency?

Select Yes to collect kernel disk command latency data for charts and reports. The default is unselected.

Collect data for kernel disk read latency?

Select Yes to collect kernel disk read latency data for charts and reports. The default is unselected.

Collect data for kernel disk write latency?

Select Yes to collect kernel disk write latency data for charts and reports. The default is unselected.

Monitor Queue Latency

Event Notification

Raise event if queue command latency exceeds the threshold?

Select Yes to raise an event if queue command latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum queue command latency

Specify the maximum queue command latency that can occur before an event is raised. The default is 0 milliseconds.

Event severity when queue command latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which queue command latency exceeds the threshold. The default is 15.

Raise event if queue read latency exceeds the threshold?

Select Yes to raise an event if queue read latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum queue read latency

Specify the maximum queue read latency that can occur before an event is raised. The default is 0 milliseconds.

Event severity when queue read latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which queue read latency exceeds the threshold. The default is 15.

Raise event if queue write latency exceeds the threshold?

Select Yes to raise an event if queue write latency exceeds the threshold you set. The default is Yes.

Threshold- Maximum queue write latency

Specify the maximum queue write latency that can occur before an event is raised. The default is 0 milliseconds.

Event severity when queue write latency exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which queue write latency exceeds the threshold. The default is 15.

Data Collection

Collect data for queue command latency?

Select Yes to collect queue command latency data for charts and reports. The default is unselected.

Collect data for queue read latency?

Select Yes to collect queue read latency data for charts and reports. The default is unselected.

Collect data for queue write latency?

Select Yes to collect queue write latency data for charts and reports. The default is unselected.

Monitor Commands

Event Notification

Raise event if commands exceeds the threshold?

Select Yes to raise an event if the number of SCSI commands issued during the collection interval exceeds the threshold you set. The default is unselected.

Threshold -- Maximum commands

Specify the maximum number of SCSI commands that can occur before an event is raised. The default is 15000.

Event severity when commands exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of SCSI commands exceeds the threshold. The default is 15.

Raise event if aborted commands exceeds the threshold?

Select Yes to raise an event if the number SCSI commands aborted during the collection interval exceeds the threshold you set. The default is unselected.

Threshold -- Maximum aborted commands

Specify the maximum number of SCSI commands that can be aborted before an event is raised. The default is 10.

Event severity if aborted commands exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of aborted SCSI commands exceeds the threshold. The default is 15.

Data Collection

Collect data for commands?

Select Yes to collect commands data for charts and reports. The default is unselected.

Collect data for aborted commands?

Select Yes to collect aborted commands data for charts and reports. The default is unselected.

Monitor Bus Resets

Event Notification

Raise event if bus resets exceeds the threshold?

Select Yes to raise an event if the number of bus resets exceeds the threshold you set. The default is unselected.

Threshold -- Maximum bus resets

Specify the maximum number of bus resets that can occur before an event is raised. The default is 10.

Event severity when bus resets exceeds the threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which bus resets exceed the threshold. The default is 15.

Data Collection

Collect data for bus resets?

Select Yes to collect data for bus resets for charts and reports. The default is unselected.