View previous topic :: View next topic |
Author |
Message |
Plexroth Tux's lil' helper
Joined: 31 Oct 2004 Posts: 77
|
Posted: Tue Apr 05, 2005 3:26 pm Post subject: Time problems |
|
|
Vexing problem. I have a brand new chaintech 7NJL6. I started noticing that the time was way off at times. After a few trivial corrections, I began to notice something was way way off. No matter how I set the time in BIOS, things would change every time i rebooted.
After a more methodical examination, I have this weird set of issues. 1. I set the time in BIOS to the correct time. 2. the system keeps correct time. 3. I power down 4. on reboot, the clock begins from the LAST SET TIME. In other words, the clock behaves as if NO TIME has passed.
To make matters worse, I repeatedly set the time in BIOS to local time. When i did a quick reboot , the time was changed somehow to UTC.
Is there a script somewhere in my system that is out of whack? Is the battery dead on my motherboard? Do i have unstable CMOS memory?
Where do I begin to solve this problem?? It's starting to F#%##%% P#%% me off. thank you.
(p.s.: Gentoo Rocks!) |
|
Back to top |
|
|
mens Guru
Joined: 27 Aug 2003 Posts: 392 Location: Belgium
|
Posted: Tue Apr 05, 2005 3:28 pm Post subject: |
|
|
First: check if your timezone is set correctly.
Second: emerge ntp to keep your time in sync. |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
Posted: Tue Apr 05, 2005 3:30 pm Post subject: |
|
|
Older baselayout: /etc/rc.conf
Newer baselayout: /etc/conf.d/clock
Edit them to reflect your wishes. (localtime, sync on shutdown)
Check your timezone.
Emerge rdate (ntp is heavy and really not needed as rdate does almost the same just much more lightweitght) and add the following line to a daily cronjob:
Code: | # CRONTAB of user <root> on <machine.domain>
#
# Example for multiple value syntax
# */2 => every second minute
# 1,4,55 => first second and 55 minute
#
# 1) minute <0-59>
# | 2) hour <0-23>
# | | 3) day <1-31>
# | | | 4) month <1-12>
# | | | | 5) day of the week <0-6; 0=sunday>
# | | | | | 6) command <redirect output>
# | | | | | |
0 3 * * * /usr/bin/rdate -s swisstime.ee.ethz.ch &> /dev/null
|
Exchange the swiss timeserver with one near your town. |
|
Back to top |
|
|
Plexroth Tux's lil' helper
Joined: 31 Oct 2004 Posts: 77
|
Posted: Tue Apr 05, 2005 3:51 pm Post subject: |
|
|
inode77 wrote: | Older baselayout: /etc/rc.conf
Newer baselayout: /etc/conf.d/clock
Edit them to reflect your wishes. (localtime, sync on shutdown)
Check your timezone.
Emerge rdate (ntp is heavy and really not needed as rdate does almost the same just much more lightweitght) and add the following line to a daily cronjob:
Code: | # CRONTAB of user <root> on <machine.domain>
#
# Example for multiple value syntax
# */2 => every second minute
# 1,4,55 => first second and 55 minute
#
# 1) minute <0-59>
# | 2) hour <0-23>
# | | 3) day <1-31>
# | | | 4) month <1-12>
# | | | | 5) day of the week <0-6; 0=sunday>
# | | | | | 6) command <redirect output>
# | | | | | |
0 3 * * * /usr/bin/rdate -s swisstime.ee.ethz.ch &> /dev/null
|
Exchange the swiss timeserver with one near your town. |
wow! thank you for the very fast response of the first two posters. I did use NTP but it did not seem to work. Then again, I did not let things settle. Part of my difficulty was that I was just chucking actions at, instead of working with, the problem.
In reply to questions: yes, time zone was set correctly. However, when i tried to set the clock with the KDE desktop app, it removed the link to /usr/share/zoneinfo/EST. That was yet another component.
What I've done now is 1. set the bios to the correct time 2. set the correct time zone. 3. let the computer run while I'm at work 4. shut down the NTP client (before steps 1 and 2)
I will see if the machine loses time over these 12 hours. I noted the time that I set originally in the bios. I plan to reboot and see if that time remains.
If i have to use rdate as a workaround, I will but it would be nice to fix the underlying problem.
Again, thank you for the help! |
|
Back to top |
|
|
Plexroth Tux's lil' helper
Joined: 31 Oct 2004 Posts: 77
|
Posted: Wed Apr 06, 2005 5:00 pm Post subject: fixed |
|
|
Ok, I fixed one part of the problem by adding fixing my "clock" file in conf.d.
I had to set the time to local and make the script sync hw time to sys time.
The motherboard clock is working. I changed so many things that I tricked myself into thinking that it was not.
NOw that it's keeping time well, I'd like to set up set up either rdate or ntp. I'm told that rdate is better.
Thanks for all the great help.
P.S. - there is another guy with the same problem, I pointed him here. Maybe he will come post too. Community is a wonderful thing... |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
Posted: Wed Apr 06, 2005 5:08 pm Post subject: |
|
|
Quote: | NOw that it's keeping time well, I'd like to set up set up either rdate or ntp. I'm told that rdate is better. |
Better (yes for me) is a hard word, I say it's different. There are differnt protocols that are permitting to sync the time of a computer and rdate uses RFC868 specified protocol. ntpdate uses a different one. As ntpdate is supplied with a whole bunch of other daemons/programs than ntpdate don't need/like it.
But if you like to provide a local time sync server for yet other clients sure thing ntp is the way to go.
Rdate => simple to keep a computer's time in sync
NTP-Suite => more complex but much much more than just to sync a compute's time. |
|
Back to top |
|
|
|