comp.protocols.time.ntp
Discussion complète de l'article :
ntpd oddness

Date

Sujet

From


01-04-2008

     ntpd oddness

John Oliver

01-04-2008

         Re: ntpd oddness

David Woolley

02-04-2008

         Re: ntpd oddness

Unruh

02-04-2008

         Re: ntpd oddness

Martin Burnicki

02-04-2008

             Re: ntpd oddness

John Oliver

02-04-2008

                 Re: ntpd oddness

Unruh

02-04-2008

         Re: ntpd oddness

Venu Gopal

02-04-2008

             Re: ntpd oddness

David Woolley

02-04-2008

                 Re: ntpd oddness

Unruh

02-04-2008

                     Re: ntpd oddness

John Oliver

02-04-2008

                         Re: ntpd oddness

Unruh

02-04-2008

                 Re: ntpd oddness

Lord High Executioner

03-04-2008

                     Re: ntpd oddness

David Woolley

02-04-2008

             Re: ntpd oddness

John Oliver

03-04-2008

                 Re: ntpd oddness

Venu Gopal

03-04-2008

                     Re: ntpd oddness

Venu Gopal

03-04-2008

                     Re: ntpd oddness

Unruh

04-04-2008

         Re: ntpd oddness

Serge Bets


Article : 27390
Date : 01-04-2008
From : John Oliver
Sujet : ntpd oddness

I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
Red Hat Enterprise Linux 4 update 5.

In the Kickstart script to configure the server, I specify:

timezone --utc GMT/London

After the installation is done:

[joliver@0123456789-VCS ~]$ date
Tue Apr 1 17:03:23 EDT 2008

/etc/localtime is a real file:

[joliver@0123456789-VCS ~]$ ls -l /etc/localtime
-rw-r--r-- 1 root root 1267 Jan 31 2007 /etc/localtime

If I remove that file and replace it with a symlink:

[joliver@0123456789-VCS ~]$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 23 Apr 1 21:04 /etc/localtime ->
/usr/share/zoneinfo/GMT

The system clock displays correctly:

[joliver@0123456789-VCS ~]$ date
Tue Apr 1 21:05:09 GMT 2008

But, now, the hwclock is always 12 hours off:

[joliver@0123456789-VCS ~]$ /sbin/hwclock
Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
[joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
[joliver@0123456789-VCS ~]$ /sbin/hwclock
Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds


1) Why is /etc/localtime a file by default instead of a symlink? Is
this just some silly Red Hat-ism that has to be avoided?

2) Why is my hardware clock 12 hours off from the system clock?

--
* John Oliver http://www.john-oliver.net/ *

--
Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27391
Date : 01-04-2008
From : David Woolley
Sujet : Re: ntpd oddness

John Oliver wrote:
> I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
> Red Hat Enterprise Linux 4 update 5.

Your problem has nothing to do with ntpd; ntpd works solely in UTC time.
The Olsen timezone package handling is all done in libc.

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27394
Date : 02-04-2008
From : Unruh
Sujet : Re: ntpd oddness

John Oliver writes:

>I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
>Red Hat Enterprise Linux 4 update 5.

>In the Kickstart script to configure the server, I specify:

>timezone --utc GMT/London

No idea what the timezone script does.
cp /usr/share/zoneinfo/GMT/London /etc/localtime
chmod a+r /etc/localtime



>After the installation is done:

>[joliver@0123456789-VCS ~]$ date
>Tue Apr 1 17:03:23 EDT 2008

>/etc/localtime is a real file:

The wrong one apparently.


>[joliver@0123456789-VCS ~]$ ls -l /etc/localtime
>-rw-r--r-- 1 root root 1267 Jan 31 2007 /etc/localtime

>If I remove that file and replace it with a symlink:

>[joliver@0123456789-VCS ~]$ ls -l /etc/localtime
>lrwxrwxrwx 1 root root 23 Apr 1 21:04 /etc/localtime ->
>/usr/share/zoneinfo/GMT

>The system clock displays correctly:

>[joliver@0123456789-VCS ~]$ date
>Tue Apr 1 21:05:09 GMT 2008

>But, now, the hwclock is always 12 hours off:

I guess you forgot to put the hardware clock on utc.



>[joliver@0123456789-VCS ~]$ /sbin/hwclock
>Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
>[joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
>[joliver@0123456789-VCS ~]$ /sbin/hwclock
>Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds


>1) Why is /etc/localtime a file by default instead of a symlink? Is

Because /usr may not be mounted when something needs the time on intial
bootup.


>this just some silly Red Hat-ism that has to be avoided?

No it is a good idea. A link could point to nowhere.



>2) Why is my hardware clock 12 hours off from the system clock?

How do we know. Make sure it is set to utc and reset it.
(look in /etc/sysconfig/clock)


>--
>* John Oliver http://www.john-oliver.net/ *

>--
>Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27396
Date : 02-04-2008
From : Martin Burnicki
Sujet : Re: ntpd oddness

John,

John Oliver wrote:
> I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
> Red Hat Enterprise Linux 4 update 5.
>
> In the Kickstart script to configure the server, I specify:
>
> timezone --utc GMT/London
>
> After the installation is done:
>
> [joliver@0123456789-VCS ~]$ date
> Tue Apr 1 17:03:23 EDT 2008

What's the output of:

date -u; date

This shows both your system's UTC time and local time according to your time
zone configuration. Which of them is correct?

> [joliver@0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
> [joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
> [joliver@0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds

Normally the system time is only initialized from the hwclock (the RTC chip
on the mainboard) at boot time, and when the system shuts down properely
the current system time should be written back to the hwclock. In most
cases you see this in the console messages.

If you have a dual/multi boot system then you must take care that all
operating systems assume the RTC to run at the same time, i.e. either local
time or UTC.

E.g. if you set the system time under Windows 2000 then the RTC will be set
to the current Windows local time. If you boot Linux afterwards you must
take care that Linux knows the correct local time offset of the RTC which
matches the Windows time zone offset. This may lead to a 1 hour offset if
you shut down the system during standard time and reboot it the next
morning after DST has started.

If the system is Linux only I'd suggest you configure your Linux system such
that the RTC chip keeps UTC time only. If then the time is not correct
after a reboot your on-board battery may be low.

Martin
--
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27400
Date : 02-04-2008
From : Venu Gopal
Sujet : Re: ntpd oddness

Hi John,

To alter the localtime zone in Linux, use tzconfig.
Till RedHat-7.3 the timezone was modified using 'setup' or
'timeconfig' utility. But since RedHat-8.0 and subsequent versions
'tzconfig' is used. I remember I've done this once.

Venu

John Oliver wrote:
> I'm having a small issue with ntp-4.2.0.a.20040617-6.el4 running under
> Red Hat Enterprise Linux 4 update 5.
>
> In the Kickstart script to configure the server, I specify:
>
> timezone --utc GMT/London
>
> After the installation is done:
>
> [joliver@0123456789-VCS ~]$ date
> Tue Apr 1 17:03:23 EDT 2008
>
> /etc/localtime is a real file:
>
> [joliver@0123456789-VCS ~]$ ls -l /etc/localtime
> -rw-r--r-- 1 root root 1267 Jan 31 2007 /etc/localtime
>
> If I remove that file and replace it with a symlink:
>
> [joliver@0123456789-VCS ~]$ ls -l /etc/localtime
> lrwxrwxrwx 1 root root 23 Apr 1 21:04 /etc/localtime ->
> /usr/share/zoneinfo/GMT
>
> The system clock displays correctly:
>
> [joliver@0123456789-VCS ~]$ date
> Tue Apr 1 21:05:09 GMT 2008
>
> But, now, the hwclock is always 12 hours off:
>
> [joliver@0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
> [joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
> [joliver@0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds
>
>
> 1) Why is /etc/localtime a file by default instead of a symlink? Is
> this just some silly Red Hat-ism that has to be avoided?
>
> 2) Why is my hardware clock 12 hours off from the system clock?
>

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27404
Date : 02-04-2008
From : David Woolley
Sujet : Re: ntpd oddness

Venu Gopal wrote:

> To alter the localtime zone in Linux, use tzconfig.

There is no such program in Slackware 11.0 Linux!

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27406
Date : 02-04-2008
From : Unruh
Sujet : Re: ntpd oddness

David Woolley writes:

>Venu Gopal wrote:

>> To alter the localtime zone in Linux, use tzconfig.

>There is no such program in Slackware 11.0 Linux!

Then do
rm /etc/localtime
cp /usr/share/zoneinfo/America/Vancouver /etc/localtime
chmod a+r /etc/localtime
as root.

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 27410
Date : 02-04-2008
From : John Oliver
Sujet : Re: ntpd oddness

On Wed, 02 Apr 2008 19:21:13 +0530, Venu Gopal wrote:
> Hi John,
>
> To alter the localtime zone in Linux, use tzconfig.

There is no "tzconfig" in Red Hat 4.

--
* John Oliver http://www.john-oliver.net/ *

--
Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27411
Date : 02-04-2008
From : John Oliver
Sujet : Re: ntpd oddness

On Wed, 02 Apr 2008 18:20:26 GMT, Unruh wrote:
> David Woolley writes:
>
>>Venu Gopal wrote:
>
>>> To alter the localtime zone in Linux, use tzconfig.
>
>>There is no such program in Slackware 11.0 Linux!
>
> Then do
> rm /etc/localtime
> cp /usr/share/zoneinfo/America/Vancouver /etc/localtime
> chmod a+r /etc/localtime
> as root.

Maybe a rhetorical question, but why should this be necessary after
you've specified the timezone during install?

--
* John Oliver http://www.john-oliver.net/ *

--
Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27412
Date : 02-04-2008
From : John Oliver
Sujet : Re: ntpd oddness

On Wed, 02 Apr 2008 09:58:38 +0200, Martin Burnicki wrote:
> What's the output of:
>
> date -u; date

[root@0123456789-VCS ~]# date -u; date
Wed Apr 2 20:29:25 UTC 2008
Wed Apr 2 20:29:25 GMT 2008

>> [joliver@0123456789-VCS ~]$ /sbin/hwclock
>> Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
>> [joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
>> [joliver@0123456789-VCS ~]$ /sbin/hwclock
>> Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds
>
> Normally the system time is only initialized from the hwclock (the RTC chip
> on the mainboard) at boot time, and when the system shuts down properely
> the current system time should be written back to the hwclock. In most
> cases you see this in the console messages.
>
> If you have a dual/multi boot system then you must take care that all
> operating systems assume the RTC to run at the same time, i.e. either local
> time or UTC.

There is only one OS on the host(s) in question.

> If the system is Linux only I'd suggest you configure your Linux system such
> that the RTC chip keeps UTC time only. If then the time is not correct
> after a reboot your on-board battery may be low.

There are no reboots. The above example is one command after another...
read the hwclock, set it from the system time, and then immediately read
it again. I don't see how this could be a hardware issue, unless this
chip is specifically programmed to always add/subtract 12 hours from the
time it's set to, which I rather doubt :-)

--
* John Oliver http://www.john-oliver.net/ *

--
Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27414
Date : 02-04-2008
From : Unruh
Sujet : Re: ntpd oddness

John Oliver writes:

>On Wed, 02 Apr 2008 18:20:26 GMT, Unruh wrote:
>> David Woolley writes:
>>
>>>Venu Gopal wrote:
>>
>>>> To alter the localtime zone in Linux, use tzconfig.
>>
>>>There is no such program in Slackware 11.0 Linux!
>>
>> Then do
>> rm /etc/localtime
>> cp /usr/share/zoneinfo/America/Vancouver /etc/localtime
>> chmod a+r /etc/localtime
>> as root.

>Maybe a rhetorical question, but why should this be necessary after
>you've specified the timezone during install?

If your timezone works, do not do it. If it does not work, which was the
case of the OP, then do this.

Eg, you have moved from New York to Shaghai for 3 months. You screwed up on
the install and accepted the default ( New York) time zone when you live in
Greece. .....

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27415
Date : 02-04-2008
From : Unruh
Sujet : Re: ntpd oddness

John Oliver writes:

>On Wed, 02 Apr 2008 09:58:38 +0200, Martin Burnicki wrote:
>> What's the output of:
>>
>> date -u; date

>[root@0123456789-VCS ~]# date -u; date
>Wed Apr 2 20:29:25 UTC 2008
>Wed Apr 2 20:29:25 GMT 2008

>>> [joliver@0123456789-VCS ~]$ /sbin/hwclock
>>> Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
>>> [joliver@0123456789-VCS ~]$ sudo /sbin/hwclock --systohc
>>> [joliver@0123456789-VCS ~]$ /sbin/hwclock
>>> Tue 01 Apr 2008 09:05:52 PM GMT -0.776568 seconds
>>
>> Normally the system time is only initialized from the hwclock (the RTC chip
>> on the mainboard) at boot time, and when the system shuts down properely
>> the current system time should be written back to the hwclock. In most
>> cases you see this in the console messages.
>>
>> If you have a dual/multi boot system then you must take care that all
>> operating systems assume the RTC to run at the same time, i.e. either local
>> time or UTC.

>There is only one OS on the host(s) in question.

Good-- information not available to us.


>> If the system is Linux only I'd suggest you configure your Linux system such
>> that the RTC chip keeps UTC time only. If then the time is not correct
>> after a reboot your on-board battery may be low.

>There are no reboots. The above example is one command after another...
>read the hwclock, set it from the system time, and then immediately read
>it again. I don't see how this could be a hardware issue, unless this
>chip is specifically programmed to always add/subtract 12 hours from the
>time it's set to, which I rather doubt :-)

cat /etc/sysconfig/clock

and post the output here.
Anyway, none of this has anything to do with ntp at all. It would be best
to go to a Linux group for your particular distribution.




>--
>* John Oliver http://www.john-oliver.net/ *

>--
>Posted via a free Usenet account from http://www.teranews.com

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27417
Date : 02-04-2008
From : Lord High Executioner
Sujet : Re: ntpd oddness

On Wed, 02 Apr 2008 17:32:58 +0100, David Woolley wrote:

> Venu Gopal wrote:
>
>> To alter the localtime zone in Linux, use tzconfig.
>
> There is no such program in Slackware 11.0 Linux!

There is probably a copy of tzselect in glibc.

/var/adm/packages/glibc-2.2.5-i386-4:usr/bin/tzselect

Assuming you have a complete install of the timezone data that will
suggest to you what /etc/localtime should symlink to or be copied from

--
2008/04/02:21:49:32UTC Slackware Linux 2.4.32
up 6 days, 1:44, 6 users, load average: 2.01, 2.07, 2.09

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27420
Date : 03-04-2008
From : David Woolley
Sujet : Re: ntpd oddness

Lord High Executioner wrote:

>
> /var/adm/packages/glibc-2.2.5-i386-4:usr/bin/tzselect
>
Yes. But the point being made is that the supporting utilities vary
from distribution to distribution and version to version, so one cannot
make an unconditional statement that tzconfig will work on Linux.

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27422
Date : 03-04-2008
From : Venu Gopal
Sujet : Re: ntpd oddness

Hi all,

My reply was specific to RedHat Linux.
Its there in RedHat releases since 8.0, so I presumed that
it would be there in RedHat Enterprise-4.0.

It is used to change the system timezone (if you want to do so).
If some one can post a method thats common to Linux distributions,
it would be grateful !

Venu


John Oliver wrote:
> On Wed, 02 Apr 2008 19:21:13 +0530, Venu Gopal wrote:
>> Hi John,
>>
>> To alter the localtime zone in Linux, use tzconfig.
>
> There is no "tzconfig" in Red Hat 4.
>

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27423
Date : 03-04-2008
From : Venu Gopal
Sujet : Re: ntpd oddness

Hi all,

'tzselect' is available in Debian, Slackware and in RedHat.
We can use this to set the timezone.

Venu

Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27427
Date : 03-04-2008
From : Unruh
Sujet : Re: ntpd oddness

Venu Gopal writes:

>Hi all,

>My reply was specific to RedHat Linux.
>Its there in RedHat releases since 8.0, so I presumed that
>it would be there in RedHat Enterprise-4.0.

>It is used to change the system timezone (if you want to do so).
>If some one can post a method thats common to Linux distributions,
>it would be grateful !

I have. Twice.
su

rm /etc/localtime
cp /usr/share/zoneinfo/America/Vancouver /etc/localtime
chmod a+r /etc/localtime
exit

(change the timezone if you are unfortunate enough not to live in
Vancouver)



Posez vos questions, réponses et remarques sur les forums de FrameIP



Article : 27441
Date : 04-04-2008
From : Serge Bets
Sujet : Re: ntpd oddness

Hello John,

On Tuesday, April 1, 2008 at 20:18:19 +0000, John Oliver wrote:

> timezone --utc GMT/London

I don't know this tool, but the correct timezone name could rather be
Europe/London, no?


> [joliver@0123456789-VCS ~]$ date
> Tue Apr 1 21:05:09 GMT 2008
>
> [joliver@0123456789-VCS ~]$ /sbin/hwclock
> Tue 01 Apr 2008 09:05:39 PM GMT -0.323329 seconds
>
> Why is my hardware clock 12 hours off from the system clock?

Because you were unfortunate enough to check it on April 1st in the
afternoon. Check it again in the morning of a normal day, and you'll
see The Light. ;-)


Serge.
--
Serge point Bets arobase laposte point net

Posez vos questions, réponses et remarques sur les forums de FrameIP




mot clé : ntpd vpn ntp comp ip voip time oddness ipv4 tcpip ipv6 protocols

Copyright © 2003-2010 FrameIP TcpIP. Tous droits réservés. Les marques et marques commerciales mentionnées appartiennent à leurs propriétaires respectifs. L'utilisation de ce site Web TcpIP implique l'acceptation des conditions d'utilisation et du règlement sur le respect de la vie privée.
Sécurité entreprise Comparatif Adsl SSII Reseaux Sécurité Test ADSL