Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   Systemd and time synchronisation problems (http://www.linux-archive.org/archlinux-general-discussion/702707-systemd-time-synchronisation-problems.html)

mike cloaked 09-11-2012 10:15 AM

Systemd and time synchronisation problems
 
Recently I changed permanently to systemd - however I have noticed
that the system clock is out by some minutes just after I have booted
up and see for example:

[mike@lapmike3 ~]$ chronyc tracking
Reference ID : 178.32.55.58 (gateway.omega.org.uk)
Stratum : 3
Ref time (UTC) : Tue Sep 11 10:03:20 2012
System time : 158.888610840 seconds fast of NTP time
Frequency : 5.454 ppm fast
Residual freq : -1.577 ppm
Skew : 13.260 ppm
Root delay : 0.062475 seconds
Root dispersion : 0.029119 seconds

I would not mind a second or two out - but 158 seconds is not
acceptable - and if I reboot then the clock is immediately out by the
same amount until it eventually re-syncs after quite a long time (10s
of minutes!)

I thought I would check the hardware clock but :

[root@lapmike3 ~]# hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for
an access method.

I had originally set up chrony which does eventually after some time
get the system clock back in sync - I do have dumponexit in my
/etc/chrony.conf but presume somewhere along the way in the transition
from iniscripts there is a configuration error?

I have in my /etc/adjtime:

0.000000 0 0.000000
0
UTC


I am running KDE - and until the system clock is re-synced it is quite
a bit off - this presumable also means that mail time stamps will be
wrong until the clock resets properly -

I have looked at the chrony and systemd arch wiki entries but I can't
find a way to get this sorted out - can anyone help out?

Thanks

--
mike c

Ralf Mardorf 09-11-2012 10:28 AM

Systemd and time synchronisation problems
 
On Tue, 2012-09-11 at 11:15 +0100, mike cloaked wrote:
> Recently I changed permanently to systemd - however I have noticed
> that the system clock is out by some minutes just after I have booted
> up and see for example:
>
> [mike@lapmike3 ~]$ chronyc tracking
> Reference ID : 178.32.55.58 (gateway.omega.org.uk)
> Stratum : 3
> Ref time (UTC) : Tue Sep 11 10:03:20 2012
> System time : 158.888610840 seconds fast of NTP time
> Frequency : 5.454 ppm fast
> Residual freq : -1.577 ppm
> Skew : 13.260 ppm
> Root delay : 0.062475 seconds
> Root dispersion : 0.029119 seconds
>
> I would not mind a second or two out - but 158 seconds is not
> acceptable - and if I reboot then the clock is immediately out by the
> same amount until it eventually re-syncs after quite a long time (10s
> of minutes!)
>
> I thought I would check the hardware clock but :
>
> [root@lapmike3 ~]# hwclock -r
> hwclock: Cannot access the Hardware Clock via any known method.
> hwclock: Use the --debug option to see the details of our search for
> an access method.
>
> I had originally set up chrony which does eventually after some time
> get the system clock back in sync - I do have dumponexit in my
> /etc/chrony.conf but presume somewhere along the way in the transition
> from iniscripts there is a configuration error?
>
> I have in my /etc/adjtime:
>
> 0.000000 0 0.000000
> 0
> UTC
>
>
> I am running KDE - and until the system clock is re-synced it is quite
> a bit off - this presumable also means that mail time stamps will be
> wrong until the clock resets properly -
>
> I have looked at the chrony and systemd arch wiki entries but I can't
> find a way to get this sorted out - can anyone help out?
>
> Thanks

Just for the record. I'm not using systemd, but with Arch Linux I
experience that the clock most of the times goes wrong around 1.5 sec
after startup. I always run ntpdate manually after startup and I noticed
that, when rebooting between different distros or simply rebooting Arch.
1.5 sec isn't a serious issue, this will happen when not using the
computer too, but it's unusual that a currently synced clock goes wrong,
caused by a reboot. I guess there's something fishy, that might not
related to systemd. FWIW I'm using the regular kernel most of the times.

Tom Rand 09-11-2012 10:41 AM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 12:28:26PM +0200, Ralf Mardorf wrote:
> On Tue, 2012-09-11 at 11:15 +0100, mike cloaked wrote:
> > Recently I changed permanently to systemd - however I have noticed
> > that the system clock is out by some minutes just after I have booted
> > up and see for example:
> >
> > [mike@lapmike3 ~]$ chronyc tracking
> > Reference ID : 178.32.55.58 (gateway.omega.org.uk)
> > Stratum : 3
> > Ref time (UTC) : Tue Sep 11 10:03:20 2012
> > System time : 158.888610840 seconds fast of NTP time
> > Frequency : 5.454 ppm fast
> > Residual freq : -1.577 ppm
> > Skew : 13.260 ppm
> > Root delay : 0.062475 seconds
> > Root dispersion : 0.029119 seconds
> >
> > I would not mind a second or two out - but 158 seconds is not
> > acceptable - and if I reboot then the clock is immediately out by the
> > same amount until it eventually re-syncs after quite a long time (10s
> > of minutes!)
> >
> > I thought I would check the hardware clock but :
> >
> > [root@lapmike3 ~]# hwclock -r
> > hwclock: Cannot access the Hardware Clock via any known method.
> > hwclock: Use the --debug option to see the details of our search for
> > an access method.
> >
> > I had originally set up chrony which does eventually after some time
> > get the system clock back in sync - I do have dumponexit in my
> > /etc/chrony.conf but presume somewhere along the way in the transition
> > from iniscripts there is a configuration error?
> >
> > I have in my /etc/adjtime:
> >
> > 0.000000 0 0.000000
> > 0
> > UTC
> >
> >
> > I am running KDE - and until the system clock is re-synced it is quite
> > a bit off - this presumable also means that mail time stamps will be
> > wrong until the clock resets properly -
> >
> > I have looked at the chrony and systemd arch wiki entries but I can't
> > find a way to get this sorted out - can anyone help out?
> >
> > Thanks
>
> Just for the record. I'm not using systemd, but with Arch Linux I
> experience that the clock most of the times goes wrong around 1.5 sec
> after startup. I always run ntpdate manually after startup and I noticed
> that, when rebooting between different distros or simply rebooting Arch.
> 1.5 sec isn't a serious issue, this will happen when not using the
> computer too, but it's unusual that a currently synced clock goes wrong,
> caused by a reboot. I guess there's something fishy, that might not
> related to systemd. FWIW I'm using the regular kernel most of the times.
>


I use Arch+systemd native & have never had time issue's but this could be that
my router(pfsense-nano-4Gb-2.0.1(cf card)LinITX) provides ntp to the LAN which
in turn look to 0-3.za.pool.ntp.org

Thomas Bächler 09-11-2012 10:59 AM

Systemd and time synchronisation problems
 
Am 11.09.2012 12:15, schrieb mike cloaked:
> Recently I changed permanently to systemd - however I have noticed
> that the system clock is out by some minutes just after I have booted
> up and see for example:
>
> [mike@lapmike3 ~]$ chronyc tracking
> Reference ID : 178.32.55.58 (gateway.omega.org.uk)
> Stratum : 3
> Ref time (UTC) : Tue Sep 11 10:03:20 2012
> System time : 158.888610840 seconds fast of NTP time
> Frequency : 5.454 ppm fast
> Residual freq : -1.577 ppm
> Skew : 13.260 ppm
> Root delay : 0.062475 seconds
> Root dispersion : 0.029119 seconds

Does chrony install a .list file to /usr/lib/systemd/ntp-units.d?

> I would not mind a second or two out - but 158 seconds is not
> acceptable - and if I reboot then the clock is immediately out by the
> same amount until it eventually re-syncs after quite a long time (10s
> of minutes!)

Your /etc/adjtime probably contains a faulty adjustment value. Delete
it, hwclock --systohc, then reboot.

mike cloaked 09-11-2012 03:16 PM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 11:59 AM, Thomas Bächler <thomas@archlinux.org> wrote:
> Am 11.09.2012 12:15, schrieb mike cloaked:
>> Recently I changed permanently to systemd - however I have noticed
>> that the system clock is out by some minutes just after I have booted
>> up and see for example:
>>
>> [mike@lapmike3 ~]$ chronyc tracking
>> Reference ID : 178.32.55.58 (gateway.omega.org.uk)
>> Stratum : 3
>> Ref time (UTC) : Tue Sep 11 10:03:20 2012
>> System time : 158.888610840 seconds fast of NTP time
>> Frequency : 5.454 ppm fast
>> Residual freq : -1.577 ppm
>> Skew : 13.260 ppm
>> Root delay : 0.062475 seconds
>> Root dispersion : 0.029119 seconds
>
> Does chrony install a .list file to /usr/lib/systemd/ntp-units.d?
>
>> I would not mind a second or two out - but 158 seconds is not
>> acceptable - and if I reboot then the clock is immediately out by the
>> same amount until it eventually re-syncs after quite a long time (10s
>> of minutes!)
>
> Your /etc/adjtime probably contains a faulty adjustment value. Delete
> it, hwclock --systohc, then reboot.
>
Thanks Thomas - I will check and report back later..... and try your
suggestion too.



--
mike c

mike cloaked 09-11-2012 04:13 PM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 11:59 AM, Thomas Bächler <thomas@archlinux.org> wrote:

> Does chrony install a .list file to /usr/lib/systemd/ntp-units.d?
>

[mike@lapmike3 Documents]$ cat /usr/lib/systemd/ntp-units.d/chrony.list
chrony.service

So yes this is the single line content of the chrony.list file

>> I would not mind a second or two out - but 158 seconds is not
>> acceptable - and if I reboot then the clock is immediately out by the
>> same amount until it eventually re-syncs after quite a long time (10s
>> of minutes!)
>
> Your /etc/adjtime probably contains a faulty adjustment value. Delete
> it, hwclock --systohc, then reboot.
>

I will delete the adjtime file and reboot after running the hwclock
command - and report back



--
mike c

mike cloaked 09-11-2012 04:16 PM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 11:59 AM, Thomas Bächler <thomas@archlinux.org> wrote:

> Your /etc/adjtime probably contains a faulty adjustment value. Delete
> it, hwclock --systohc, then reboot.
>
There is a problem running the hwclock command:

[root@lapmike3 etc]# hwclock --systohc
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for
an access method.

Any suggestion as to work around this?



--
mike c

mike cloaked 09-11-2012 04:17 PM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 5:16 PM, mike cloaked <mike.cloaked@gmail.com> wrote:
> On Tue, Sep 11, 2012 at 11:59 AM, Thomas Bächler <thomas@archlinux.org> wrote:
>
>> Your /etc/adjtime probably contains a faulty adjustment value. Delete
>> it, hwclock --systohc, then reboot.
>>
> There is a problem running the hwclock command:
>
> [root@lapmike3 etc]# hwclock --systohc
> hwclock: Cannot access the Hardware Clock via any known method.
> hwclock: Use the --debug option to see the details of our search for
> an access method.
>
> Any suggestion as to work around this?
>
I tried:

[root@lapmike3 etc]# hwclock --debug
hwclock from util-linux 2.21.2
hwclock: Open of /dev/rtc failed: Device or resource busy
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

--
mike c

Thomas Bächler 09-11-2012 04:52 PM

Systemd and time synchronisation problems
 
Am 11.09.2012 18:17, schrieb mike cloaked:
> On Tue, Sep 11, 2012 at 5:16 PM, mike cloaked <mike.cloaked@gmail.com> wrote:
>> On Tue, Sep 11, 2012 at 11:59 AM, Thomas Bächler <thomas@archlinux.org> wrote:
>>
>>> Your /etc/adjtime probably contains a faulty adjustment value. Delete
>>> it, hwclock --systohc, then reboot.
>>>
>> There is a problem running the hwclock command:
>>
>> [root@lapmike3 etc]# hwclock --systohc
>> hwclock: Cannot access the Hardware Clock via any known method.
>> hwclock: Use the --debug option to see the details of our search for
>> an access method.
>>
>> Any suggestion as to work around this?
>>
> I tried:
>
> [root@lapmike3 etc]# hwclock --debug
> hwclock from util-linux 2.21.2
> hwclock: Open of /dev/rtc failed: Device or resource busy
> No usable clock interface found.
> hwclock: Cannot access the Hardware Clock via any known method.

I guess you need to stop chrony when playing with hwclock. Maybe it is
enough to just delete adjtime without that command.

Forgot to tell you (but it's probably too late now) to post the first
line of your /etc/adjtime, this would have told us if we are on the
right track.

mike cloaked 09-11-2012 05:03 PM

Systemd and time synchronisation problems
 
On Tue, Sep 11, 2012 at 5:52 PM, Thomas Bächler <thomas@archlinux.org> wrote:
> Am 11.09.2012 18:17, schrieb mike cloaked:

> I guess you need to stop chrony when playing with hwclock. Maybe it is
> enough to just delete adjtime without that command.
>
> Forgot to tell you (but it's probably too late now) to post the first
> line of your /etc/adjtime, this would have told us if we are on the
> right track.
>

OK I will try with chrony stopped - the first line of adjtime is:

0.000000 0 0.000000

I saved the file as .bak before fiddling!

--
mike c


All times are GMT. The time now is 02:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.