# clock starts skewing after 40 days, with ntp running (smp)

## bunder

hi there,

for some reason i have to reboot a server of mine every ~40 days or else the clock starts jumping ahead in seconds.  i can't seem to get it to stop skewing otherwise.  any help would be appreciated.  i don't really know where to start...   :Crying or Very sad: 

----------

## mamac

Hello,

Does ntpdate work?

How do you use ntp? Is it scheduled with cron?

----------

## bunder

ntpdate works.  i run ntpd with the init scripts.  i've tried wiping out /var/lib/ntp/ntp.drift and /etc/adjtime and restarting ntpd to no avail.

```

ntpq -pn

     remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

 192.168.1.12    132.246.168.148  3 u    5   64  377    1.497  -20418. 3006.71

```

----------

## mamac

 *bunder wrote:*   

> ...i run ntpd with the init scripts...

 

So ntpdate runs only at startup?

Maybe you should run ntpdate once every day, no?

----------

## bunder

 *jean-marc.beaune wrote:*   

>  *bunder wrote:*   ...i run ntpd with the init scripts... 
> 
> So ntpdate runs only at startup?
> 
> Maybe you should run ntpdate once every day, no?

 

that would defeat the purpose of running ntpd.  the problem is that it starts doing this after 40 days or so... it was fine last week.

edit: i fixed it the last time by rebooting.  i'm an uptime whore, and would like to keep from rebooting the thing every 35 days or so.

----------

## nobspangle

Do you get anything in the ntp log to suggest why it thinks it should start skewing the time?

----------

## bunder

 *nobspangle wrote:*   

> Do you get anything in the ntp log to suggest why it thinks it should start skewing the time?

 

```
 2 Jun 06:18:56 ntpd[8769]: synchronized to 192.168.1.12, stratum 3

 2 Jun 06:18:56 ntpd[8769]: kernel time sync disabled 0041

 2 Jun 06:26:25 ntpd[8769]: kernel time sync enabled 0001

 4 Jul 22:29:39 ntpd[8769]: no servers reachable

 5 Jul 00:01:31 ntpd[8769]: synchronized to 192.168.1.12, stratum 3 <- my lan ntp server

12 Jul 03:47:31 ntpd[8769]: no servers reachable <- my lan server never went down, no other machines on the lan did this

14 Jul 22:46:30 ntpd[8769]: ntpd exiting on signal 15 <- this is when i realized it was skewing

14 Jul 22:03:31 ntpd[26768]: ntpd exiting on signal 15 <- sync'd up and restarted

14 Jul 22:44:02 ntpd[27664]: ntpd exiting on signal 15 <- again... etc.

14 Jul 00:01:32 ntpd[28059]: ntpd exiting on signal 15

14 Jul 00:01:39 ntpd[28175]: ntpd exiting on signal 15

14 Jul 23:40:58 ntpd[28460]: ntpd exiting on signal 15

15 Jul 09:54:26 ntpd[28835]: ntpd exiting on signal 15
```

could this be a kernel thing?  i see this in my dmesg:

```
set_rtc_mmss: can't update from 55 to 2

set_rtc_mmss: can't update from 55 to 2

etc
```

----------

## bunder

i hate to bump my own thread, but i got fed up and rebooted again.  this time i booted with these options:

```
 disable_timer_pin_1 noapic acpi=noirq no_irq_poll

```

i'll be back in 40 days or so, i suppose.   :Laughing: 

----------

