Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When a Linux machine with NTP capabilities will start and it does not find the NTP server, how it will determine the time? A clue I have is that it uses some heuristic method but I don't need what does that mean.

My main question is: How can I track such an event on a monitoring purpose?

share|improve this question
up vote 3 down vote accepted

During boot, the Linux kernel will typically retrieve the system time from an on-board RTC chip. This would occur before networking services/daemons like NTP are up and running. When NTP does try to connect to a server and fails, then the system time is simply not changed. So there is no "heuristic method". Some architectures or platforms can vary this scheme; e.g. I've modified U-Boot to try and connect to the SNTP server to update the RTC before the Linux ARM kernel is loaded.

Check the system log (the 'dmesg' command) for system clock settings.

share|improve this answer
Tracking when the RTC is used as a server time I have to track when all the NTP calls get failed. Any clue, where this information could be found? – mico Jun 14 '11 at 9:53
The NTP daemon writes to the system log by default. The level of reporting detail can be configured. The man page for ntpd has the details. – sawdust Jun 14 '11 at 18:48
@Mikko: Linux only reads time from the RTC once -- during early kernel startup. After that, the RTC is not read from, unless you manually issue hwclock --hctosys. – grawity Jun 14 '11 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .