Results 1 to 5 of 5
Thread: Problem with Clock
Enjoy an ad free experience by logging in. Not a member yet? Register.
Problem with Clock
My clock is totally messed up. It is horribly out of sync and is extremely random. It throws itself off by hours at a time. Is there any way I can have my clock display the time from some sort of time server? (Yoper v2)
You can install ntp and use the program ntpdate <server>. Just find a server that you like, add it to your crontab and you're all set!"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
so then my clock in the lower-righthand corner of the screen will reflect that? cool
- Join Date
- Aug 2004
- Seattle, Wa.
From the Support forum at yoper.com
Does the hamster in your computer not run fast enough, thereby causing your clock to lose a few minutes or hours? Who do those hamsters think they are!
The solution is to use the Network Time Protocol (NTP). This guide will show you how to set up your computer to automatically update its clock when you want it to.
First, open a console and do this:
su (enter the root account's password) apt-get update apt-get install ntp
tar -zxvf netselect-0.3.tar.gz cd netselect make su (enter the root account's password) make install
Now open a console and do this:
su (enter the root account's password) netselect -vv -s 10 -t 25 $(cat /etc/ntp.list)
When I run it, I get this output:
root@yos jesse # netselect -vv -s 10 -t 25 $(cat /etc/ntp.list) Running netselect to choose 10 out of 75 addresses. [Server details are displayed here - pretty interesting stuff!] 96 ntp.cs.strath.ac.uk 129 ntp2c.mcc.ac.uk 135 ntp2b.mcc.ac.uk 137 ntp2a.mcc.ac.uk 187 fartein.ifi.uio.no 191 ntp.maths.tcd.ie 260 louie.udel.edu 358 timeserver.cs.umb.edu 384 fuzz.psc.edu 453 chime.utoronto.ca
From my results, I can see that six of the top ten servers were in the UK or Ireland. I will use them as they are closest to me and therefore faster than the rest. Your results will most likely vary from mine, so please do run the test yourself to get correct results.
Now to set up your computer to automatically update your clock, open a console and do this:
su (enter the root account's password) crontab -e
0 0,8,16 * * * ntpdate ntp.cs.strath.ac.uk ntp2a.mcc.ac.uk ntp2b.mcc.ac.uk ntp2c.mcc.ac.uk ntp2d.mcc.ac.uk ntp.maths.tcd.ie
The above line tells your computer to update its clock at midnight, 8 am and 4 pm on the hour, every day and month, no matter which day of the week it is, from the servers your provide it with. You might not want to do it that often, in which case you just change the "0,8,16" part to the hours when your computer is on and you'd like it to update its clock.
This is where the results from netselect come in. You'll need to change the names of the servers I have used (after ntpdate) to be specific to you.
If you would rather update your clock manually (i.e. not at set times), you can still run ntpdate from your console by doing this:
su (enter the root account's password) ntpdate ntp.cs.strath.ac.uk ntp2a.mcc.ac.uk ntp2b.mcc.ac.uk ntp2c.mcc.ac.uk ntp2d.mcc.ac.uk ntp.maths.tcd.ie
root@yos jesse # ntpdate ntp.cs.strath.ac.uk ntp2a.mcc.ac.uk ntp2b.mcc.ac.uk ntp2c.mcc.ac.uk ntp2d.mcc.ac.uk ntp.maths.tcd.ie Looking for host ntp.cs.strath.ac.uk and service ntp host found : ntp0.cis.strath.ac.uk Looking for host ntp2a.mcc.ac.uk and service ntp host found : maverick.mcc.ac.uk Looking for host ntp2b.mcc.ac.uk and service ntp host found : veracity.mcc.ac.uk Looking for host ntp2c.mcc.ac.uk and service ntp host found : utserv.mcc.ac.uk Looking for host ntp2d.mcc.ac.uk and service ntp host found : scarp.mc.man.ac.uk Looking for host ntp.maths.tcd.ie and service ntp host found : lanczos.maths.tcd.ie 7 Sep 21:54:45 ntpdate: step time server 18.104.22.168 offset -1.119338 sec
- Join Date
- Sep 2004
That will work, granted that it's not your cmos battery going bad, I'm having the same problem and I believe it's my battery. My laptop will loose anywhere from 20 min while I've got it up and running to an hour if I leave it unplugged from wall socket. Not a fun thing I tell you.