You are not logged in.
I have been setting my time using this command:
timedatectl set-time 19:30:00I want to make it automatic. I read these two pages:
https://wiki.archlinux.org/index.php/System_time
https://wiki.archlinux.org/index.php/Ne … col_daemon
And what I did is:
sudo ln -s /usr/share/zoneinfo/GMT /etc/localtime
sudo pacman -S ntp
sudo ntpd -u ntp:ntp
sudo systemctl enable ntpdate.service
ntpq -p
sudo timedatectl set-ntp trueThe current output of:
$timedatectl status
Local time: Sat 2020-06-06 19:21:01 GMT
Universal time: Sat 2020-06-06 19:21:01 UTC
RTC time: Sat 2020-06-06 19:21:02
Time zone: GMT (GMT, +0000)
System clock synchronized: no
NTP service: active
RTC in local TZ: noThe time remains unchanged even after a reboot. What am I doing wrong?
Last edited by light9876 (2020-06-07 09:28:34)
Offline
sudo ntpd -u ntp:ntpmanually start ntpd
sudo systemctl enable ntpdate.serviceenable the service but do not start it
ntpq -pprint the status of peers. What was the output?
sudo timedatectl set-ntp truestart and enable systemd-timesyncd?
What is the output of
ntpq -p
systemctl status ntpdate.service
systemctl status systemd-timesyncd.service
ps aux | grep ntpdOffline
$ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
lithium.rubbler .XFAC. 16 u - 1024 0 0.000 +0.000 0.000
x.ns.gin.ntt.ne .XFAC. 16 u - 1024 0 0.000 +0.000 0.000
ntp.uk.eria.one .XFAC. 16 u - 1024 0 0.000 +0.000 0.000
fifi.m.faelix.n .XFAC. 16 u - 1024 0 0.000 +0.000 0.000$systemctl status ntpdate.service
● ntpdate.service - One-Shot Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; enabled; vendor preset: disabled)
Active: activating (start) since Sat 2020-06-06 19:02:12 GMT; 35min ago
Main PID: 447 (ntpd)
Tasks: 2 (limit: 19041)
Memory: 5.8M
CGroup: /system.slice/ntpdate.service
└─447 /usr/bin/ntpd -q -n -g -u ntp:ntp
Jun 06 19:02:12 elias ntpd[447]: 6 Jun 19:02:12 ntpd[447]: Listen normally on 2 lo 127.0.0.1:123
Jun 06 19:02:12 elias ntpd[447]: 6 Jun 19:02:12 ntpd[447]: Listen normally on 3 lo [::1]:123
Jun 06 19:02:12 elias ntpd[447]: 6 Jun 19:02:12 ntpd[447]: Listening on routing socket on fd #20 for interface updates
Jun 06 19:02:12 elias ntpd[447]: Listening on routing socket on fd #20 for interface updates
Jun 06 19:02:19 elias ntpd[447]: Listen normally on 4 enp3s0 100.65.247.3:123
Jun 06 19:02:19 elias ntpd[447]: 6 Jun 19:02:19 ntpd[447]: Listen normally on 4 enp3s0 100.65.247.3:123
Jun 06 19:02:19 elias ntpd[447]: 6 Jun 19:02:19 ntpd[447]: Listen normally on 5 enp3s0 [fe80::e3f6:10b9:1a94:e2db%2]:123
Jun 06 19:02:19 elias ntpd[447]: 6 Jun 19:02:19 ntpd[447]: new interface(s) found: waking up resolver
Jun 06 19:02:19 elias ntpd[447]: Listen normally on 5 enp3s0 [fe80::e3f6:10b9:1a94:e2db%2]:123
Jun 06 19:02:19 elias ntpd[447]: new interface(s) found: waking up resolver$systemctl status systemd-timesyncd.service
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-06-06 19:20:58 GMT; 17min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 1337 (systemd-timesyn)
Status: "Idle."
Tasks: 2 (limit: 19041)
Memory: 2.1M
CGroup: /system.slice/systemd-timesyncd.service
└─1337 /usr/lib/systemd/systemd-timesyncd
Jun 06 19:20:58 elias systemd[1]: Starting Network Time Synchronization...
Jun 06 19:20:58 elias systemd[1]: Started Network Time Synchronization.$ps aux | grep ntpd
ntp 447 0.0 0.0 74952 5544 ? Ssl 19:12 0:00 /usr/bin/ntpd -q -n -g -u ntp:ntp
elias 2057 0.0 0.0 6296 2144 pts/0 S+ 19:38 0:00 grep --colour=auto ntpdLast edited by light9876 (2020-06-06 18:30:27)
Offline
ntpd has not determined the accuracy of the peers, so it has no reference time to adjust to, when the peers stratum drops to 2 or 3 then ntpd will start adjusting the time.
You have two competing services ntpd and systemd-timesyncd.service managing the clock is that intended?
Offline
Oh I thought both services were required. If so, then I only need one.
Say I want to use only systemd-timesyncd, what shall I do now?
And thank you for your time.
Offline
If you only want to use systemd-timesyncd disable and stop ntpdate.service you can also remove the ntp package.
Offline
Keep in mind that it's unclear whether systemd-timesyncd is reliable if you don't use systemd-networkd as network management tool.
NTP on the other hand works if there's any active network connection.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thank you all!
Offline