You are not logged in.
Pages: 1
Hi everyone,
My system clock falls behind with 8-20 sec on a daily basis.
sudo ntpd -qg
[sudo] password for vb:
9 Aug 06:30:10 ntpd[9783]: ntpd 4.2.8p11@1.3728-o Sun May 20 11:32:11 UTC 2018 (1): Starting
9 Aug 06:30:10 ntpd[9783]: Command line: ntpd -qg
9 Aug 06:30:10 ntpd[9783]: proto: precision = 0.133 usec (-23)
9 Aug 06:30:10 ntpd[9783]: Listen and drop on 0 v6wildcard [::]:123
9 Aug 06:30:10 ntpd[9783]: Listen and drop on 1 v4wildcard 0.0.0.0:123
9 Aug 06:30:10 ntpd[9783]: Listen normally on 2 lo 127.0.0.1:123
9 Aug 06:30:10 ntpd[9783]: Listen normally on 3 enp5s0 192.168.8.100:123
9 Aug 06:30:10 ntpd[9783]: Listen normally on 4 lo [::1]:123
9 Aug 06:30:10 ntpd[9783]: Listen normally on 5 enp5s0 [fe80::4529:fbee:db10:9284%2]:123
9 Aug 06:30:10 ntpd[9783]: Listening on routing socket on fd #22 for interface updates
9 Aug 06:30:48 ntpd[9783]: ntpd: time set +31.500567 s
ntpd: time set +31.500567sYesterday I did not check it but the day before yesterday it was something like 40+ sec behind.
Is there a way I can prevent this from happening?
Thank you!
Last edited by amaro (2018-08-09 04:45:16)
Offline
What service are you using and are you running it continuously, or once per boot?
Offline
I do not recall setting some specific service to run either continuously or on boot.
I used to shutdown the laptop every night but a few months ago I decided not to do it. So now I reboot once a week and sometimes even once in 10 days.
After reading your question I guess may be this has something to do with it.
Anyway. I will appreciate it if you could give me some hints what services to check.
Offline
Pick one of these and set up a time sync daemon/service: https://wiki.archlinux.org/index.php/Ca … e_Protocol
Offline
Thank you, Jason!
Will check them.
Do you think changing the server in /etc/ntp.conf would help?
Offline
Changing the server means nothing if there is no service running...
Offline
Got it!
Thank you, Jason!
Edit
Enabled ntpdate.service and changed the servers in /etc/ntp.conf. Will check the results tomorrow.
Last edited by amaro (2018-08-09 04:43:19)
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
You really got me thinking about this and now I checked my cron.daily and there is a file called ntpd.
Here is what is in it:
@midnight ntpd -qgObviously it is not working. What is wrong with it?
Edit
This seems to be running but not working as intended to
ctl status cronie.service
[sudo] password for vb:
● cronie.service - Periodic Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; vendor preset: disabl>
Active: active (running) since Wed 2018-08-08 23:54:53 EEST; 8h ago
Main PID: 599 (crond)
Tasks: 1 (limit: 4537)
Memory: 2.9M
CGroup: /system.slice/cronie.service
└─599 /usr/bin/crond -n
Aug 09 07:54:01 hp CROND[10787]: (vb) CMDOUT (cronie is running...)
Aug 09 07:54:01 hp CROND[10787]: pam_unix(crond:session): session closed for user vb
Aug 09 07:56:01 hp crond[10822]: pam_unix(crond:session): session opened for user vb by (>
Aug 09 07:56:01 hp CROND[10823]: (vb) CMD (echo "cronie is running...")
Aug 09 07:56:01 hp CROND[10822]: (vb) CMDOUT (cronie is running...)
Aug 09 07:56:01 hp CROND[10822]: pam_unix(crond:session): session closed for user vb
Aug 09 07:58:01 hp crond[10835]: pam_unix(crond:session): session opened for user vb by (>
Aug 09 07:58:01 hp CROND[10836]: (vb) CMD (echo "cronie is running...")
Aug 09 07:58:01 hp CROND[10835]: (vb) CMDOUT (cronie is running...)
Aug 09 07:58:01 hp CROND[10835]: pam_unix(crond:session): session closed for user vbThere must be something wrong.
Last edited by amaro (2018-08-09 05:05:20)
Offline
How do you know it's not working? Is your computer on ad midnight and/or do you run a cron implementation that runs missed jobs on startup? Is a cron implementation running? Does your computer stay on for days at a time, or do you poweroff/reboot? If the latter, you do know that changes from ntpd will not persist automatically - you need to set the hardware clock to the system clock after running ntpd if you want the adjustment to persist across boots. Otherwise the correction needed by ntpd each time it is run would be expected to be bigger.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
The laptop stays on for days. As far as I can understand this means the job cannot be missed.
Offline
Pages: 1