The clock on my laptop runs a bit fast (no matter what OS I'm running on it, but it's been straight debian-style knoppix for a while now). Can someone point out a simple enough way to correct the time from a remote time server or similar?
The clock on my laptop runs a bit fast (no matter what OS I'm running on it, but it's been straight debian-style knoppix for a while now). Can someone point out a simple enough way to correct the time from a remote time server or similar?
Disclaimer, this is generic advice, not tested on Knoppix as I am currently downloading it.
As a first step you should look at the manual page for hwclock. It has facilities to account for clock drift, and is probably already installed.
I like Dan Bernsteins 'clockspeed' package. Essentially have to download the source and compile it. You then give it an accurate time using NTP, wait a while, give it a second accurate time using NTP. It then uses this to work out how much it has to adjust your clock by, and then sits in the background doing so.
Available from http://cr.yp.to
Warnings. Dan's stuff is not "Open Source". You get the source code from him, and can do anything you like with it except redistribute it. I have no problem with this, but some people do.
It uses the high resolution clock cycle counter on your machine, so if your machine changes its clock rate, then 'clockspeed' will not work for you.
You can write a tiny shell script which calls adjtimex in an infinite loop, or failing that you can always write a small C (or whatever) program, which calls 'adjtime', then sleeps in an infinite loop.
Installing ntp and ntp-simple should do what you want you will have to set a time server in a config file and that should be it.Originally Posted by UselessPython
[edit]
The config file would be /etc/ntp.conf put the servers at the bottom.
[/edit]
I found this on Google:-
rdate -s ntp2b.mcc.ac.uk
- run it from the command line or from a script that runs at boot. Actually I think is was Stephen (from the last post) - didn't you suggest adding these sorts of things to the bootmisc.sh script? - It works great if you do add it there.
The network time server in the command above is (obviously) UK based, you need to find one nearby, another job for Google?
many thanks, Stu.....

HPE ProLiant MicroServer Gen10 Plus with Power Adapter
$599.00
HP ProLiant MicroServer Gen8 Tower Server Xeon E3-1220 v2 2.3GHz 16GB RAM
$289.99
HP Proliant MicroServer Gen 8 2.23GHz Xeon 16GB RAM NO SSD
$249.99
Supermicro E300-12C Mini 1U Barebone X12SCV-LVDS LGA1200 SNK-P0073A4 w/ Adapter
$225.00
New Barebones Supermicro 5019D Server, 4C/8T Xeon D-2123T, 1U Rackmountable, 10G
$404.99
Supermicro SYS-6048R-E1CR36N 36B LFF 4U Server -V3- Choose CPUs/RAM - Wholesale
$4574.00
HP PROLIANT MICROSERVER GEN8 INTEL PENTIUM G2020T @ 2.50GHz, 8GB RAM, NO HDD/OS
$164.98
HP PROLIANT MICROSERVER GEN8 INTEL PENTIUM G2020T @ 2.50GHz, 8GB RAM, NO HDD/OS
$164.98
Supermicro 938-16 16-LFF MicroCloud SuperServer 5038MR-H8TRF *No Blade Servers*
$159.99
New Supermicro SuperServer E50-9AP-Wifi Mini PC Server
$175.00