The chronyd working [root@desk mythcat]# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; I don't find the driftfile command , why ? [root@desk mythcat]# driftfile /var/lib/ntp/drift bash: driftfile: command not found
On 15/08/2020 10:30, Cătălin George Feștilă wrote:
The chronyd working [root@desk mythcat]# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; I don't find the driftfile command , why ? [root@desk mythcat]# driftfile /var/lib/ntp/drift bash: driftfile: command not found
[john@HP_Box ~]$ cat /var/lib/chrony/drift 6.003813 0.029500 [john@HP_Box ~]$
That's in el7; F31 is similar.
On Sat, 15 Aug 2020 12:30:18 +0300 Cătălin George Feștilă wrote:
The chronyd working [root@desk mythcat]# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; I don't find the driftfile command , why ? [root@desk mythcat]# driftfile /var/lib/ntp/drift bash: driftfile: command not found
Probably because ntp isn't installed, chrony is a different package. You can install ntp from the repos (but turn off chrony before trying to run ntp).
On Sat, Aug 15, 2020 at 8:54 AM Tom Horsley horsley1953@gmail.com wrote:
On Sat, 15 Aug 2020 12:30:18 +0300 Cătălin George Feștilă wrote:
The chronyd working [root@desk mythcat]# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; I don't find the driftfile command , why ? [root@desk mythcat]# driftfile /var/lib/ntp/drift bash: driftfile: command not found
Probably because ntp isn't installed, chrony is a different package. You can install ntp from the repos (but turn off chrony before trying to run ntp).
(Container so IMMV):
[root@fedorium /]# cat /etc/redhat-release Fedora release 31 (Thirty One) [root@fedorium /]# dnf whatprovides */drift Last metadata expiration check: 91 days, 23:42:34 ago on Fri May 15 14:34:25 2020. chrony-3.5-4.fc31.x86_64 : An NTP client/server Repo : fedora Matched from: Filename : /var/lib/chrony/drift ^^^^^^--- As seen by John Pilkington on TV
ntp-4.2.8p13-3.fc31.x86_64 : The NTP daemon and utilities Repo : fedora Matched from: Filename : /var/lib/ntp/drift
xscreensaver-extras-1:5.43-2.fc31.x86_64 : An enhanced set of screensavers Repo : fedora Matched from: Filename : /usr/libexec/xscreensaver/drift
xscreensaver-extras-1:5.44-2.fc31.x86_64 : An enhanced set of screensavers Repo : updates Matched from: Filename : /usr/libexec/xscreensaver/drift
[root@fedorium /]#
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
/var/lib/ntp/ is empty ... I have settings for chrony ... vim /etc/chrony.conf with the line: # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift [mythcat@desk ~]$ cat /var/lib/chrony/drift -12.876545 3.064993 About the ntp, I enable ntpd and this is result without [mythcat@desk ~]$ sudo dnf install ntp Last metadata expiration check: 0:17:59 ago on Sun 16 Aug 2020 10:20:23 AM EEST. Package ntp-4.2.8p15-1.fc32.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [mythcat@desk ~]$ cat /etc/redhat-release Fedora release 32 (Thirty Two) [mythcat@desk ~]$ systemctl status ntpd ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor [mythcat@desk ~]$ sudo ls /var/lib/ntp/drift [sudo] password for mythcat: ls: cannot access '/var/lib/ntp/drift': No such file or directory [mythcat@desk ~]$ sudo ls /var/lib/ntp/
You can see is empty , I don't know why ... I don't know this args whatprovides for dnf, thank's for share [mythcat@desk ~]$ dnf whatprovides */drift Last metadata expiration check: 1 day, 11:45:25 ago on Fri 14 Aug 2020 10:52:10 PM EEST. chrony-3.5-8.fc32.x86_64 : An NTP client/server Repo : @System Matched from: Filename : /var/lib/chrony/drift
chrony-3.5-8.fc32.x86_64 : An NTP client/server Repo : fedora Matched from: Filename : /var/lib/chrony/drift
ntp-4.2.8p13-5.fc32.x86_64 : The NTP daemon and utilities Repo : fedora Matched from: Filename : /var/lib/ntp/drift
ntp-4.2.8p15-1.fc32.x86_64 : The NTP daemon and utilities Repo : @System Matched from: Filename : /var/lib/ntp/drift
ntp-4.2.8p15-1.fc32.x86_64 : The NTP daemon and utilities Repo : updates Matched from: Filename : /var/lib/ntp/drift
xscreensaver-extras-1:5.44-1.fc32.x86_64 : An enhanced set of screensavers Repo : fedora Matched from: Filename : /usr/libexec/xscreensaver/drift
xscreensaver-extras-1:5.44-2.fc32.x86_64 : An enhanced set of screensavers Repo : updates Matched from: Filename : /usr/libexec/xscreensaver/drift
On Sat, Aug 15, 2020 at 5:28 PM Mauricio Tavares raubvogel@gmail.com wrote:
On Sat, Aug 15, 2020 at 8:54 AM Tom Horsley horsley1953@gmail.com wrote:
On Sat, 15 Aug 2020 12:30:18 +0300 Cătălin George Feștilă wrote:
The chronyd working [root@desk mythcat]# systemctl status chronyd ● chronyd.service - NTP client/server Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; I don't find the driftfile command , why ? [root@desk mythcat]# driftfile /var/lib/ntp/drift bash: driftfile: command not found
Probably because ntp isn't installed, chrony is a different package. You can install ntp from the repos (but turn off chrony before trying to run ntp).
(Container so IMMV):
[root@fedorium /]# cat /etc/redhat-release Fedora release 31 (Thirty One) [root@fedorium /]# dnf whatprovides */drift Last metadata expiration check: 91 days, 23:42:34 ago on Fri May 15 14:34:25 2020. chrony-3.5-4.fc31.x86_64 : An NTP client/server Repo : fedora Matched from: Filename : /var/lib/chrony/drift ^^^^^^--- As seen by John Pilkington on TV
ntp-4.2.8p13-3.fc31.x86_64 : The NTP daemon and utilities Repo : fedora Matched from: Filename : /var/lib/ntp/drift
xscreensaver-extras-1:5.43-2.fc31.x86_64 : An enhanced set of screensavers Repo : fedora Matched from: Filename : /usr/libexec/xscreensaver/drift
xscreensaver-extras-1:5.44-2.fc31.x86_64 : An enhanced set of screensavers Repo : updates Matched from: Filename : /usr/libexec/xscreensaver/drift
[root@fedorium /]#
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
On 16/08/2020 08:43, Cătălin George Feștilă wrote:
/var/lib/ntp/ is empty ... I have settings for chrony ... vim /etc/chrony.conf with the line: # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift [mythcat@desk ~]$ cat /var/lib/chrony/drift -12.876545 3.064993
It looks to me as if that 'driftfile' reference is just defining the location of the file that holds the offset and drift rate. It isn't a command, it's a 'directive' for chrony.conf.
man chrony.conf
The driftfile directive allows a file to be specified into which chronyd can store the rate information. Two parameters are recorded in the file. The first is the rate at which the system clock gains or loses time, expressed in parts per million, with gains positive. Therefore, a value of 100.0 indicates that when the system clock has advanced by a second, it has gained 100 microseconds in reality (so the true time has only advanced by 999900 microseconds). The second is an estimate of the error bound around the first value in which the true rate actually lies.
HTH
John P
The chrony has that file. ... for ntp feature, the folder /var/lib/ntp/ is empty even the ntpd is working. I will use chronyd, but is this a real problem with ntp feature?
It looks to me as if that 'driftfile' reference is just defining the
location of the file that holds the offset and drift rate. It isn't a command, it's a 'directive' for chrony.conf.
On 2020-08-16 15:43, Cătălin George Feștilă wrote:
var/lib/ntp/ is empty ... I have settings for chrony ... vim /etc/chrony.conf with the line: # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift [mythcat@desk ~]$ cat /var/lib/chrony/drift -12.876545 3.064993 About the ntp, I enable ntpd and this is result without [mythcat@desk ~]$ sudo dnf install ntp Last metadata expiration check: 0:17:59 ago on Sun 16 Aug 2020 10:20:23 AM EEST. Package ntp-4.2.8p15-1.fc32.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! [mythcat@desk ~]$ cat /etc/redhat-release Fedora release 32 (Thirty Two) [mythcat@desk ~]$ systemctl status ntpd ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor
First of all, chronyd and ntpd are both NTP implementations. You can run either one, but not both. By default, fedora installs and uses chronyd.
If you wish to run ntpd instead of chronyd you should do....
systemctl --now disable ntpd systemctl --now enable ntpd
You should then see something like....
systemctl status ntpd ● ntpd.service - Network Time Service Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2020-08-16 16:24:43 CST; 1h 5min ago Process: 1965 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS) Main PID: 1967 (ntpd) Tasks: 2 (limit: 1327) Memory: 1.4M CPU: 356ms CGroup: /system.slice/ntpd.service └─1967 /usr/sbin/ntpd -u ntp:ntp -g
Aug 16 16:26:01 f32x.greshko.com ntpd[1967]: Soliciting pool server 2001:418:8405:4002::3 Aug 16 16:26:01 f32x.greshko.com ntpd[1967]: Soliciting pool server 2607:fcd0:100:8203::ba91:df54
Then take note of the man page for ntpd. And you'll find....
the drift file is automatically updated once per hour and is available to initialize the frequency on subsequent daemon restarts
This means that ntpd must be running for 1 hour before the drift file is created/updated.
Note that I started ntpd at 16:26:01. At that time no drift file existed. But then....
[root@f32x ~]# ll /var/lib/ntp/ total 4 -rw-r--r--. 1 ntp ntp 8 Aug 16 17:24 drift [root@f32x ~]# cat /var/lib/ntp/drift -19.732
On 2020-08-16 17:39, Ed Greshko wrote:
If you wish to run ntpd instead of chronyd you should do....
systemctl --now disable ntpd systemctl --now enable ntpd
Ah.....typo...
systemctl --now disable chronyd systemctl --now enable ntpd