* Marco Calistri
Il 18/11/18 16:56, Carlos E. R. ha scritto:
On 18/11/2018 14.51, Marco Calistri wrote:
I was relying on ntpd service since ever until I read about "chronyd" as the substitute of ntpd adopted by new opensuse releases, then I switched to chronyd.
Despite this it seems ntp package being still necessary (?) or could be removed by the system?
To verify if my system is synchronized I use the command "timedatectl":
marco@linux-turion64:~> timedatectl Local time: dom 2018-11-18 11:40:48 -02 Universal time: dom 2018-11-18 13:40:48 UTC RTC time: dom 2018-11-18 11:40:48 Time zone: America/Sao_Paulo (-02, -0200) System clock synchronized: yes NTP service: inactive RTC in local TZ: yes
Interesting command! I did not know about it. But it would be rather more interesting if it displayed milliseconds, as it does it is not sufficient.
It also, now that I think, does not display the network time at all, in my case from ntp, so I do not know how well my clock is synced - or not.
Hello Carlos,
My Linux box is not a 24/24 server then I decided to switch to chronyd: https://www.thegeekdiary.com/centos-rhel-7-chrony-vs-ntp-differences-between...
being a server is not a requirement for ntpd vs chronyd, it is a choice. one may choose either for any connected box providing any service. 18:07 toshiba: ~ # systemctl status chronyd;timedatectl;ntptime ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: disabled) Active: inactive (dead) since Sun 2018-11-18 15:04:42 EST; 3h 3min ago Docs: man:chronyd(8) man:chrony.conf(5) Main PID: 2192 (code=exited, status=0/SUCCESS) Nov 18 11:31:34 toshiba.wahoo.no-ip.org systemd[1]: Starting NTP client/server... Nov 18 11:31:35 toshiba.wahoo.no-ip.org chronyd[2192]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVD> Nov 18 11:31:35 toshiba.wahoo.no-ip.org chronyd[2192]: Frequency -15.548 +/- 0.076 ppm read from /var/lib/chrony/drift Nov 18 11:31:35 toshiba.wahoo.no-ip.org systemd[1]: Started NTP client/server. Nov 18 11:31:40 toshiba.wahoo.no-ip.org chronyd[2192]: Selected source 199.102.46.73 Nov 18 15:04:42 toshiba.wahoo.no-ip.org chronyd[2192]: chronyd exiting Nov 18 15:04:42 toshiba.wahoo.no-ip.org systemd[1]: Stopping NTP client/server... Nov 18 15:04:42 toshiba.wahoo.no-ip.org systemd[1]: Stopped NTP client/server. Local time: Sun 2018-11-18 18:08:30 EST Universal time: Sun 2018-11-18 23:08:30 UTC RTC time: Sun 2018-11-18 18:08:30 Time zone: America/Indiana/Indianapolis (EST, -0500) System clock synchronized: no NTP service: active RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'. ntp_gettime() returns code 5 (ERROR) time df9c6f6e.4eed1394 Sun, Nov 18 2018 18:08:30.308, (.308305198), maximum error 1412500 us, estimated error 0 us, TAI offset 0 ntp_adjtime() returns code 5 (ERROR) modes 0x0 (), offset 12.379 us, frequency 18.604 ppm, interval 1 s, maximum error 1412500 us, estimated error 0 us, status 0x6041 (PLL,UNSYNC,NANO,MODE), time constant 7, precision 0.001 us, tolerance 500 ppm, 18:10 wahoo: ~ # systemctl status ntpd;timedatectl;ntptime ● ntpd.service - NTP Server Daemon Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled) Drop-In: /run/systemd/generator/ntpd.service.d └─50-insserv.conf-$time.conf Active: active (running) since Sun 2018-11-18 18:05:22 EST; 5min ago Docs: man:ntpd(1) Process: 20973 ExecStart=/usr/sbin/start-ntpd start (code=exited, status=0/SUCCESS) Main PID: 20984 (ntpd) Tasks: 2 (limit: 512) CGroup: /system.slice/ntpd.service ├─20984 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c /etc/ntp.conf └─20985 ntpd: asynchronous dns resolver Nov 18 18:05:22 wahoo systemd[1]: Starting NTP Server Daemon... Nov 18 18:05:22 wahoo ntpd[20983]: ntpd 4.2.8p10@1.3728-o Fri May 26 14:07:29 UTC 2017 (1): Starting Nov 18 18:05:22 wahoo ntpd[20983]: Command line: /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c /etc/ntp.conf Nov 18 18:05:22 wahoo ntpd[20984]: proto: precision = 0.084 usec (-23) Nov 18 18:05:22 wahoo ntpd[20984]: switching logging to file /var/log/ntp Nov 18 18:05:22 wahoo start-ntpd[20973]: Starting network time protocol daemon (NTPD) Nov 18 18:05:22 wahoo systemd[1]: Started NTP Server Daemon. Hint: Some lines were ellipsized, use -l to show in full. Local time: Sun 2018-11-18 18:11:15 EST Universal time: Sun 2018-11-18 23:11:15 UTC RTC time: Sun 2018-11-18 23:11:15 Time zone: America/Indiana/Indianapolis (EST, -0500) Network time on: yes NTP synchronized: yes RTC in local TZ: no ntp_gettime() returns code 0 (OK) time df9c7013.f22003ac Sun, Nov 18 2018 18:11:15.945, (.945801052), maximum error 169215 us, estimated error 1875 us, TAI offset 0 ntp_adjtime() returns code 0 (OK) modes 0x0 (), offset -836.944 us, frequency -8.556 ppm, interval 1 s, maximum error 169215 us, estimated error 1875 us, status 0x2001 (PLL,NANO), time constant 6, precision 0.001 us, tolerance 500 ppm, in this particular case the server happens to be running ntpd but could just as well be running chronyd. the time precision reported is the same. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org