The user discussed the difference between two columns in ControlUp’s KB – TimeSpan is based on a specific timezone and Uptime is calculated from the LastBootTime. Uptime in minutes is the difference between the same Uptime converted to DateTime and the local machine’s DateTime.Now, which can be queried in PowerShell through Get-WmiObject or System.DateTime.Now. Further information can be found in the ControlUp support documentation at https://support.controlup.com/docs/monitor-cluster-powershell-fields-by-table?highlight=Uptime%20in%20minutes.
Read the entire ‘Investigating Discrepancies in ControlUp Columns’ thread below:
why would these columns be different
According to KB one is a „TimeSpan“ and one an "DateTime" Type…
Maybe Timespan is calculated on a specific Timezone!?
Because there is exactly one hour difference :)Daylight savings?
don’t know. Not all servers on the site have the difference just unusual
For the Uptime column, we query the Win32_OperatingSystem WMI namespace and seek for the LastBootTime value (after some comparions with kernal boot time to make sure we don’t have a skew and more).
For "Uptime in minutes", we pass the same Uptime (that was converted into DateTime) and define a new DateTime of Now and subtract the passed Uptime. It’s possbile that the LastBootTime in WMI doesn’t aligne with the local machine "DateTime.Now".
You can query the DateTime.Now in PowerShell like –
[System.DateTime]::Now
and also via PS, the WMI value –
Get-WmiObject -Class Win32_OperatingSystem | select -Property LastBootUpTime
cheers
Continue reading and comment on the thread ‘Investigating Discrepancies in ControlUp Columns’. Not a member? Join Here!
Categories: All Archives, ControlUp Real-Time DX