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.....

Cisco Nexus N9K-C92160YC-X 48P 25GbE SFP28 6P QSFP+/QSFP28 PE Switch
$439.00
Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch
$129.99
Cisco Catalyst C9130AXI-B WiFi 6 802.11ax Wireless Access Point Brand New
$101.99
Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99
Cisco | N3K-C3232C | 32-Port 100G QSFP Network Switch W/ 2x PSU, 2x Power Cords
$205.00
Cisco Catalyst WS-C2960X-48FPD-L 48-Port Gigabit Managed PoE+ Ethernet Switch
$69.99
Cisco C9200-48P-E Cisco POE Network Switch
$749.99
Cisco C3850-NM-2-10G Catalyst 3850 2 x 10GE Network Module
$30.00
$75.00
Cisco QSFP-40G-SR-BD Module 10-2945-02 NEW CLAMSHELL
$45.50