# Freebsd 8.0-RC1 time-of-day



## roy2098 (Oct 22, 2009)

Running on Dual Xeon 2.8 Proc Proliant DL380 G3 system upgraded via cvs from an installed from CD 7.1. GENERIC kernel (only commented out i386 i486 etc) otherwise stock kernel.

Machine boots and runs fine, but produces this error when booting:

kernel: warning: no time-of-day clock registered, system time will not be set accurately

I am setting time with ntpdate (via option to do so on startup set with sysinstall) and when you run the date command the date/time is correct BUT the time in the logs is some 5 hours behind.

Suggestions?


----------



## DutchDaemon (Oct 22, 2009)

No clock device (clock_dev) it seems. What gives [cmd=]grep -i -E '(time|clock)' /var/run/dmesg.boot[/cmd]?


----------



## roy2098 (Oct 22, 2009)

```
fbsd2# grep -i -E '(time|clock)' /var/run/dmesg.boot
Timecounter "i8254" frequency 1193182 Hz quality 0
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x920-0x923 on acpi0
pmtimer0 on isa0
Timecounters tick every 1.000 msec
warning: no time-of-day clock registered, system time will not be set accurately
```


----------



## DutchDaemon (Oct 22, 2009)

Well, all I can find about this is from an old FreeBSD/SPARC article:



> > warning: no time-of-day clock registered, system time will not be set
> > accurately
> 
> Yup, there's no driver for the time-of-day clock in these beasties.
> ...



So I guess putting this in /etc/rc.conf

```
ntpdate_enable="YES"
ntpdate_flags="-u -b ip_of_timeserver"
```
and running e.g. net/openntpd is the next best solution for now.

I think I have FreeBSD on a DL380 somewhere (on some DL360/G4 machines for sure), but I can't remember having seen this problem. Maybe it was a G4 or higher.


----------



## roy2098 (Oct 23, 2009)

Didn't quite work. I'm setting the time on bootup with ntpdate, the openntpd daemon (ntpd) is running with two processes:

```
fbsd2# ps ax|grep ntp
461 ?? Is 0:00.00 ntpd: [priv] (ntpd)
462 ?? S 0:00.01 ntpd: ntp engine (ntpd)
```
I've put the ntpd.conf in both /etc and /usr/local/etc

but I'm still getting the message:

```
Oct 23 02:20:47 fbsd2 kernel: warning: no time-of-day clock registered, system time will not be set accurately
```
I've run FBSD 7.1 on this same hardware and never saw this message at all.

So I'm not going to worry about it but it would be nice to get the right timestamp in the message log. Maybe over time the daemon will get the system to the right time but strangely the maillog shows the correct time as does the output from date, as I noted above. Also, does the openntpd daemon need a driftfile?

And thanks Dutch for all your help!


----------



## roy2098 (Oct 23, 2009)

Just checked, looks like the timestamp in /var/log/messages is approaching the exact time...


----------



## DutchDaemon (Oct 23, 2009)

Openntpd keeps a drift file in /var/db/ntpd.drift if I'm not mistaken, and it uses /usr/local/etc/ntpd.conf as its config. When there are huge leaps in time required, it will be done over time [sic], not straight away.


----------



## fronclynne (Oct 25, 2009)

Using the base ntpd(8):

```
ntpd_enable="YES"
ntpd_sync_on_start="YES"
```
in /etc/rc.conf should accomplish the same thing.


----------

