Results 1 to 5 of 5
Hi
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 ...
- 09-06-2004 #1
Problem with Clock
Hi
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)
-lakerdonald
- 09-06-2004 #2
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
- 09-06-2004 #3
so then my clock in the lower-righthand corner of the screen will reflect that? cool
Thanks
-lakerdonald
- 09-09-2004 #4Just Joined!
- Join Date
- Aug 2004
- Location
- Seattle, Wa.
- Posts
- 6
From the Support forum at yoper.com
good luckDoes 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:
Now go to http://www.worldvisions.ca/~apenwarr/netselect/ and download the source code for netselect. Go into the directory where you downloaded netselect-0.3.tar.gz and do this:Code:su (enter the root account's password) apt-get update apt-get install ntp
Download the file I have attached to this topic and save it as /etc/ntp.list. I have copied and modified it from a nifty program called cmdtime3 (sadly, not available for Linux).Code: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:
This will use netselect to test the latency between your computer and the remote NTP time servers, using the ntp.list file as input for the list of servers to test. It will send 25 packets to at least half of the servers and in the end will show you a list of the top 10 servers after outputting some info (vv - very verbose).Code: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:
This shows that out of the 75 servers tested, 10 of them had pings roughly 453 milliseconds or less. This is how long it takes to send a bit of information from my computer to the remote server and receive a reply back from it. There are 1000 milliseconds in one second.Code: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:
When nano (a simple to use console-based text editor) opens up, you need to add a line like this right after the last one:Code:su (enter the root account's password) crontab -e
Make sure to leave an extra spare line at the end of the file.Code: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:
Remember to change the list of servers you give it. This is the output I get from the above line:Code: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
I hope this is of help to the users with old and fragile hamsters running around in their computers!Code: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[15311]: step time server 130.88.200.6 offset -1.119338 sec
- 09-10-2004 #5Just Joined!
- Join Date
- Sep 2004
- Posts
- 4
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.


Reply With Quote