Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 181080

Host Hardware Sensors stale data through PowerCLI

$
0
0

I'm trying to read the temperature values available on the hardware status tab on our hosts via PowerCLI:

Get-VMHost | Sort | % {
    $reading = ((Get-View $_.id).Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | ? {$_.Name -like "*External Environment*"}).CurrentReading
    Write "$_`t$reading"
}

host1   2100
host2   2300
[...]

 

The values are usually off by a few degrees if I compare them to the values displayed on the ILO website of the host or the hardware status tab in the vSphere Client (which are matching up).

I tried refreshing sensors manually in the Client and executing:

(Get-View (Get-VMHost -Name host1 | Get-View).ConfigManager.HealthStatusSystem).ResetSystemHealthInfo()

(Get-View (Get-VMHost -Name host1 | Get-View).ConfigManager.HealthStatusSystem).UpdateViewData()

(Get-View (Get-VMHost -Name host1 | Get-View).ConfigManager.HealthStatusSystem).RefreshHealthStatusSystem()

as suggested by http://kb.vmware.com/kb/1037330, but I still get old (or incorrect?) values when querying the temperature like above through PowerCLI

 

Using ESXi 5.0 U1 and PowerCLI 5.0.1 build 581491.


Viewing all articles
Browse latest Browse all 181080

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>