FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-01-2008, 04:30 PM
"Daniel B. Thurman"
 
Default F8 & F9: Date & Time

i386 (i686)

In F8, on every reboot, the date and/or time settings get really
messed up. I am not allowed to set the 'adjust Date & Time'
settings via the "tool" (upper-right corner) even when I log
in as root - the Calendar/Time dialog is greyed-out, meaning
it is not available so I have to resort to the date command-line
setting to get it right. Even tho, a reboot screws it up all over
again. The screwed up date/time setting is not fixed via the
ntp setting I think because it is so far out of date/time?

In F9, same as in F8, except that I am allowed to set the date/time
via the GUI interface.

What gives?

Dan

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-01-2008, 05:53 PM
Jeremy
 
Default F8 & F9: Date & Time

Hello Dan,



Do you have the ntp daemon installed? If so check your /etc/ntp.conf
file. Also check if the ntp daemon is running (system - administartion
- services).



Jeremy



Daniel B. Thurman wrote:


i386 (i686)




In F8, on every reboot, the date and/or time settings get really


messed up.* I am not allowed to set the 'adjust Date & Time'


settings via the "tool" (upper-right corner) even when I log


in as root - the Calendar/Time dialog is greyed-out, meaning


it is not available so I have to resort to the date command-line


setting to get it right.* Even tho, a reboot screws it up all over


again.* The screwed up date/time setting is not fixed via the


ntp setting I think because it is so far out of date/time?




In F9, same as in F8, except that I am allowed to set the date/time


via the GUI interface.




What gives?




Dan








--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-01-2008, 06:17 PM
Todd Denniston
 
Default F8 & F9: Date & Time

Daniel B. Thurman wrote, On 08/01/2008 12:30 PM:


i386 (i686)

In F8, on every reboot, the date and/or time settings get really
messed up. I am not allowed to set the 'adjust Date & Time'
settings via the "tool" (upper-right corner) even when I log
in as root - the Calendar/Time dialog is greyed-out, meaning
it is not available so I have to resort to the date command-line
setting to get it right. Even tho, a reboot screws it up all over
again. The screwed up date/time setting is not fixed via the
ntp setting I think because it is so far out of date/time?

In F9, same as in F8, except that I am allowed to set the date/time
via the GUI interface.

What gives?



Assuming your hardware clock is working REASONABLY, i.e., battery backed
quartz accuracy and it is not so old a BIOS that it jumps back years[4].


<WarmButton>
You've hit an area that has bugged me for years with RH and Fedora (actually I
think ALL distro's do this), but I have not had/taken the time to properly
document and submit a patch.


Summary: A) syncing the hardware clock from the system clock when the system
clock sync with real time state is unknown is a bad thing. B) rewriting
/etc/adjtime[0] with data that has been confused by running ntpd is not good.



issue with (A): even if the clock has been set by the admin during this
uptime, use of the computer IO interfaces can make the system clock drift
quite radically, i.e., by seconds per hour[1]. The system clock can not be
trusted to be a reliable source of time longer than the ADMIN of the machine
knows about.


issue with (B): because of some code in the kernel, every 11 minutes while
ntpd has declared the system in sync, the hardware clock is set to the system
clock. This is OK in a machine that is always up, or ALWAYS on a network with
a decent time server available. If on the other hand you are operating a
laptop that moves from network to network or network to stand alone for long
periods of time, then when the halt script drives the (ntp good) time to the
hardware clock the /etc/adjtime data will have the hardware clock's drift
zero'ed out.




What should be done:
1) When the system boots:
read hardware clock to system clock (done already in current config)
hwclock --adjust (new)
read hardware clock to system clock (new [3])
[if ntpd service is running]
ntpdate (done already in current
/etc/rc.d/init.d/ntpd)
#immediately after a _successful_ ntpdate
hwclock --systohc ( [2] done already in current
/etc/rc.d/init.d/ntpd)

3) When the system is shutdown:
[if ntpd service is *NOT* running]
DON'T MESS WITH THE HWCLOCK!

[if ntpd service is running]
#either determine that the system has been in
#sync for the last 11 minutes or
#use a _successful_ ntpdate[2].
##grab the good /etc/adjtime data
hwclock --systohc
##replace the bogus drift data in the
## new /etc/adjtime with the reasonable
## drift data from the old /etc/adjtime


On, one of my home systems I had built up the scripting in halt to do the
above, but I have not had time to even play with that system for a while.

On most of my systems I just beat halt into submission with:

--- /etc/rc.d/init.d/halt 2007/10/08 19:18:54 1.1
+++ /etc/rc.d/init.d/halt 2007/12/03 21:23:43
@@ -126,7 +126,10 @@
;;
esac

-[ -x /sbin/hwclock ] && action $"Syncing hardware clock to system time"
/sbin/hwclock $CLOCKFLAGS

+#the system time should only be synced to the hardware clock
+#when the admin KNOWS they set the time correctly or when NTP knows
+#it set the time correctly.
+#[ -x /sbin/hwclock ] && action $"Syncing hardware clock to system time"
/sbin/hwclock $CLOCKFLAGS


# Try to unmount tmpfs filesystems to avoid swapping them in. Ignore
failures. tmpfs=$(awk '$2 ~ /^/($|proc|dev)/ { next; }



</WarmButton>

[0] man hwclock
read the "The Adjust Function" section for the format of the file.


[1] I have used a laptop with a PCMCIA network interface and it would drift by
10's of seconds per hour when the network was being used heavily. NTP even
had trouble (multiple syncs per hour) keeping it synced when the network was
in use.


[2] we know that immediately after a _successful_ ntpdate the system has
EXCELLENT time, so using it is OK. If this was the only time that the HW clock
was being messed with, we would have very good drift data in /etc/adjtime to
adjust the clock with in the future.


[3] if NTP is not being used, and a reasonable /etc/adjtime exists, AND the
halt script is not messing with the hardware clock, I have seen the
/etc/adjtime drift data keep a computer within 10 seconds per year.



[4] man hwclock
read the info with the --badyear option.

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-01-2008, 09:23 PM
Aaron Konstam
 
Default F8 & F9: Date & Time

On Fri, 2008-08-01 at 09:30 -0700, Daniel B. Thurman wrote:
> i386 (i686)
>
> In F8, on every reboot, the date and/or time settings get really
> messed up. I am not allowed to set the 'adjust Date & Time'
> settings via the "tool" (upper-right corner) even when I log
> in as root - the Calendar/Time dialog is greyed-out, meaning
> it is not available so I have to resort to the date command-line
> setting to get it right. Even tho, a reboot screws it up all over
> again. The screwed up date/time setting is not fixed via the
> ntp setting I think because it is so far out of date/time?
>
> In F9, same as in F8, except that I am allowed to set the date/time
> via the GUI interface.
>
> What gives?
>
> Dan
>
Two things: ntp will not correct the time if it is more than 1 hour off
Two, when you reboot the system time is reset from the BIOS time. Is
your BIOS time stable. Your BIOS battery being weak will cause that to
happen,
--
================================================== =====================
Failure is more frequently from want of energy than want of capital.
================================================== =====================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-01-2008, 11:11 PM
g
 
Default F8 & F9: Date & Time

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel B. Thurman wrote:
>
> i386 (i686)
>
> In F8, on every reboot, the date and/or time settings get really
> messed up.

'messed up' in not a clear and definitive term to use when you want
help for a tech support list. key word here is 'tech' = 'technical'.

messed up is not technical. technical is;

time is of by xx hours. date is of by xx days.
month is of by xx months. years are of by xx years.

or;

clock resets to 00:00:00 01/01/1950, or what ever.

a technical way to trouble shoot problem;

power system down to full power off. if a switch in back of case,
turn off *after* power down.

wait 3 to 5 minutes, turn power back on. bring system back up,
during bios startup, press <delete> key to enter bios, note time.
if ok, press <f10> to continue boot.

**note** if correct, cmos battery cell _may_be_ ok. if battery cell
is more than 2 years old, battery cell _should_ be replaced.

if time is incorrect, fully power down system, replace battery cell.
power system back up, <delete> at bios check, set correct time and date.
press <f10> key to save and continue.

you really do not need to use 'ntp', but if you do it needs to be
set up. to find all related to 'ntp', run 'locate ntp|grep doc' and
run 'locate ntp|grep man'. this will give you all of information you
will need to correctly set up 'ntp'.

leave of '|grep' to see all of what is involved with 'ntp'.

also, run 'locate adjtime' for additional time setting info.

time correction is done as 'root' user.

hth.

- --

tc,hago.

g
.

in a free world without fences, who needs gates.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFIk5gD+C4Bj9Rkw/wRAlOgAKDRIT6JuRFcyBBO/LFjNlZ1zMrChwCgyffG
sYlNDepRTlc66O4ahIdQviU=
=XIkB
-----END PGP SIGNATURE-----

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-01-2008, 11:13 PM
g
 
Default F8 & F9: Date & Time

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jeremy,

being that you are using;

> }} User-Agent: Thunderbird 2.0.0.14 (X11/20080501) {{

please configure preferences and bookmarks to send 'text/plain'
and not 'text/html'.

thank you.


- --

tc,hago.

g
.

in a free world without fences, who needs gates.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFIk5im+C4Bj9Rkw/wRAu5+AKCM2KJ9vBTuDFei0rR9fMuf1j7p+ACgmruG
vlMWPocxR9c5+90RMY9vyxI=
=GZnm
-----END PGP SIGNATURE-----

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-02-2008, 01:28 AM
"Daniel B. Thurman"
 
Default F8 & F9: Date & Time

Jeremy wrote:

Hello Dan,

Do you have the ntp daemon installed? If so check your /etc/ntp.conf
file. Also check if the ntp daemon is running (system - administartion
- services).


Jeremy

Uh oh, top posting?

Yes, ntp is running and is properly, I believe. It snaps in
once I get the time setting close enough. Somehow time
is off anywhere from 2-8 hours in the past or in the future
after a reboot.

FYI, here is my ntp.conf
=======================================
cat /etc/ntp.conf
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5),
ntp_mon(5).


driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.fedora.pool.ntp.org dynamic
server 1.fedora.pool.ntp.org dynamic
server 2.fedora.pool.ntp.org dynamic

#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10

# Enable public key cryptography.
#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-02-2008, 01:55 AM
"Kevin J. Cummings"
 
Default F8 & F9: Date & Time

Daniel B. Thurman wrote:

Yes, ntp is running and is properly, I believe. It snaps in
once I get the time setting close enough. Somehow time
is off anywhere from 2-8 hours in the past or in the future
after a reboot.


In System > Administration > Date & Time
under the Network Time Protocol tab, under Advanced Options,
you can check the box: Synchronize system clock before starting service
IIRC, this should correct your clock before ntpd starts....

I also seen to remember that it is possible to write your system's time
*back* to the CMOS clock during shutdown. I just can't seem to find out
where that gets configured ATM.


--
Kevin J. Cummings
kjchome@rcn.com
cummings@kjchome.homeip.net
cummings@kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-02-2008, 02:24 AM
g
 
Default F8 & F9: Date & Time

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin J. Cummings wrote:
<snip>
> I also seen to remember that it is possible to write your system's time
> *back* to the CMOS clock during shutdown. I just can't seem to find out
> where that gets configured ATM.

/etc/rc.d/init.d/halt


- --

tc,hago.

g
.

in a free world without fences, who needs gates.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFIk8Vj+C4Bj9Rkw/wRArFIAJ4maYvjZMDf/hH6Pq+/cPbZEy66+gCeO/0w
YP8ibD/GiwedaPtSDRoiY90=
=uoUS
-----END PGP SIGNATURE-----

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-02-2008, 03:01 AM
Tim
 
Default F8 & F9: Date & Time

On Fri, 2008-08-01 at 21:55 -0400, Kevin J. Cummings wrote:
> the Network Time Protocol tab, under Advanced Options, you can check
> the box: Synchronize system clock before starting service IIRC, this
> should correct your clock before ntpd starts....

If you're using NetworkManager, like me, that probably won't work. As
the network hasn't come up in time for ntpdate to work.

--
[tim@localhost ~]$ uname -r
2.6.25.11-97.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 07:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org