vSphere ESX/ESXi hardware status sensors return different cached values in API than in vSphere Client
search cancel

vSphere ESX/ESXi hardware status sensors return different cached values in API than in vSphere Client


Article ID: 344028


Updated On:


VMware VMware vCenter Server VMware vSphere ESXi



PowerCLI and other API methods may report different sensor values for ESX/ESXi host status, as compared to the vSphere Client connected to vCenter Server.

For example, a list of non-green sensors obtained via PowerCLI may contain sensors which the vSphere Client reports as green:
Get-VMHost myesxhost |
% {(get-view $_.id).runtime.healthSystemRuntime.systemHealthInfo.NumericSensorInfo |
Where-Object {$_.HealthState.Label -notmatch 'Green'}}
Could return the result:
Name : VMware Rollup Health State
HealthState : VMware.Vim.ElementDescription
CurrentReading : 0
UnitModifier : 0
BaseUnits :
RateUnits :
SensorType : system
DynamicType :
DynamicProperty :


VMware vSphere SDK for Perl 4.1
VMware vCenter Server 4.1.x
VMware VirtualCenter 2.5.x
VMware vCenter Server 4.0.x
VMware ESXi 4.1.x Installable
VMware vSphere Web Services SDK 4.1
VI Toolkit (for Windows) 1.0
VI Perl Toolkit 1.5
VI SDK 2.0
VMware ESXi 4.0.x Installable
VMware vSphere PowerCLI 4.1
VMware CIM SDK 4.1
VMware ESXi 3.5.x Embedded
VMware CIM SDK 4.0
VMware ESX Server 3.5.x
VMware ESXi 4.0.x Embedded
VMware ESX 4.1.x
VI SDK 2.5
VI Perl Toolkit 1.0
VMware vSphere SDK for Perl 4.0
VI Perl Toolkit 1.6
VMware ESXi 4.1.x Embedded
VI Toolkit (for Windows) 1.5
VMware CIM SDK for ESX 3.0
VMware Infrastructure SDK 2.0.x
VMware ESXi 3.5.x Installable
VMware ESX 4.0.x
VMware vSphere PowerCLI 4.0


This issue can occur when information being fetched is cached. The vmware-hostd management service refreshes hostd health information via CIM every 90 seconds, with back-off up to 10 minutes. The cache can be refreshed using the vSphere API call RefreshHealthStatusSystem() prior to retrieving health status information.

For example, to refresh health status information from PowerCLI:
(Get-View (Get-VMHost -Name esxhostname | Get-View).ConfigManager.HealthStatusSystem).RefreshHealthStatusSystem()
Note: If refreshing the sensors does not update the returned information, the sensors may be stuck in unhealthy states. To reset the state of the sensors in the IPMI subsystem, use the vSphere API call ResetSystemHealthInfo(). For example, to reset the IPMI sensors from PowerCLI:
(Get-View (Get-VMHost -Name esxhostname | Get-View).ConfigManager.HealthStatusSystem).ResetSystemHealthInfo()