Hi Seb
Uptime is calculated between these two log lines:
XymonCollectInfo: Date processing (uses WMI data) XymonCollectInfo: Adding CPU usage etc to main process data
Uptime message is sent in the main data packet, not any of the extra ones like procruntime / dirtime etc. That packet is sent after the “Sending to Server” log message.
As far as I know the server only uses the content of the [uptime] section to generate the alert.
the uptime message (which has a timestamp of 16:26:38)
Are you referring to the Bootup: line? If so, that comes directly from WMI, you can test it in a Powershell prompt:
(Get-WmiObject -Class Win32_OperatingSystem).LastBootUpTime
…and if that is not working correctly then it’s more of a WMI/Windows problem.
Zak
From: SebA <spah at syntec.co.uk> Sent: Friday, 1 February 2019 17:06 To: Beck, Zak <zak.beck at accenture.com> Cc: Xymon Mailing List <xymon at xymon.com> Subject: Re: [External] [Xymon] Xymon WinPSclient uptime bug
Hi Zak,
I can reproduce this in v.2.28 and the latest v2.34 on this server, and judging by the time on the Xymon server the uptime message (which has a timestamp of 16:26:38) is sent during the following message:
2019-02-01 16:26:38 Sending output for procruntime 2019-02-01 16:26:38 Using ASCII encoding 2019-02-01 16:26:38 Connecting to host x.x.x.x 2019-02-01 16:26:39 Sent 96 bytes to server 2019-02-01 16:26:39 Received 0 bytes from server
The uptime in c:\xymon-lastcollect.txt is correct when I follow the procedure you described, but I think that may be calculated later:
2019-02-01 16:26:39 Sending to server 2019-02-01 16:26:39 Using ASCII encoding 2019-02-01 16:26:40 Connecting to host x.x.x.x 2019-02-01 16:26:40 Sent 912722 bytes to server 2019-02-01 16:26:40 Received 578 bytes from server