I just woke up to all my lights on and my server off. It was a power cut, but… Checking the logs for Proxmox, it seems to have lost memory… There were no logs for 10 days and when rebooting it said the system clock was off by as much (931,920 seconds = 10.7 days). What do? Anyone seen this before?

  • tal@olio.cafe
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 hours ago

    I’d also bet against the CMOS battery, if the pre-reboot logs were off by 10 days.

    The CMOS battery is used to maintain the clock when the PC is powered off. But he has a discrepancy between current time and pre-reboot logs. He shouldn’t see that if the clock only got messed up during the power loss.

    I’d think that the time was off by 10 days prior to power loss.

    I don’t know why it’d be off by 10 days. I don’t know uptime of the system, but that seems like an implausible amount of drift for a PC RTC, from what I see online as lilely RTC drift.

    It might be that somehow, the system was set up to use some other time source, and that was off.

    It looks like chrony is using the Debian NTP pool at boot, though, and I donpt know why it’d change.

    Can DHCP serve an NTP server, maybe?

    kagis

    This says that it can, and at least when the comment was written, 12 years ago, Linux used it.

    https://superuser.com/questions/656695/which-clients-accept-dhcp-option-42-to-configure-their-ntp-servers

    The ISC DHCP client (which is used in almost any Linux distribution) and its variants accept the NTP field. There isn’t another well known/universal client that accepts this value.

    If I have to guess about why OSX nor Windows supports this option, I would say is due the various flaws that the base DHCP protocol has, like no Authentification Method, since mal intentioned DHCP servers could change your systems clocks, etc. Also, there aren’t lots of DHCP clients out there (I only know Windows and ISC-based clients), so that leave little (or no) options where to pick.

    Maybe OS X allows you to install another DHCP client, Windows isn’t so easy, but you could be sure that Linux does.

    My Debian trixie system hhas the ISC DHCP client installed in 2025, so might still be a factor. Maybe a consumer broadband router on your network was configured to tell the Proxmox box to use it as a NTP server or something? I mean, bit of a long shot, but nothing else that would change the NTP time source immediately comes to mind, unless you changed NTP config and didn’t restart chrony, and the power loss did it.