You are not logged in.
hello,
some time ago I had set netctl so that at startup it would launch the "ntpd -qg" command to automatically update the time:
$ cat /etc/netctl/pippo
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
#Address=('192.168.1.23/24' '192.168.1.87/24')
#Address=('192.168.1.33/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
#Gateway='192.168.1.1'
#DNS=('8.8.8.8')
## For IPv6 autoconfiguration
#IP6=stateless
## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'
ExcludeAuto=no
ExecUpPost='/usr/bin/ntpd -qg || true'
ExecDownPre='killall ntpd || true'
it has always worked, but in the last few days it has already happened to me twice that I had the wrong time, for example today when I started the PC the time was 8 minutes behind. how do you explain it?
i use netctl-ifplugd service to start my ethernet:
$ sudo systemctl status netctl-ifplugd@eth0.service
● netctl-ifplugd@eth0.service - Automatic wired network connection using netctl profiles
Loaded: loaded (]8;;file://linux/usr/lib/systemd/system/netctl-ifplugd@.service/usr/lib/systemd/system/netctl-ifplugd@.service]8;;; enabled; preset: disabled)]8;;
Active: active (running) since Wed 2024-06-26 12:07:49 CEST; 1h 21min ago
Invocation: 683a42cff9d644648b368ea85b2e324b
Docs: ]8;;man:netctl.special(7)man:netctl.special(7)]8;;]8;;
Main PID: 530 (ifplugd)
Status: "online"
Tasks: 2 (limit: 8718)
Memory: 7.4M (peak: 11.9M)
CPU: 165ms
CGroup: /system.slice/system-netctl\x2difplugd.slice/netctl-ifplugd@eth0.service
├─530 /usr/bin/ifplugd -i eth0 -r /etc/ifplugd/netctl.action -d 0 -bfIns
└─595 dhclient -4 -q -e TIMEOUT=30 -pf /run/dhclient-eth0-4.pid eth0
$ netctl status pippo
○ netctl@pippo.service - Networking for netctl profile pippo
Loaded: loaded (]8;;file://linux/usr/lib/systemd/system/netctl@.service/usr/lib/systemd/system/netctl@.service]8;;; static)]8;;
Active: inactive (dead)
Docs: ]8;;man:netctl.profile(5)man:netctl.profile(5)]8;;]8;;
Last edited by quellen (2024-06-26 11:30:44)
sorry for my bad english
Offline
ExecUpPost='/usr/bin/ntpd -qg || true'
ExecDownPre='killall ntpd || true'
You should not have to kill anything w/ "-q", increase the debug level and redirect the output (incl. stderr) of ntpd into some file to see what's going wrong. Might be your timeserver or the connection doesn't really work at this point.
Offline