Re: why driftfile is not on Fedora 32 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
The key to getting good answers is to ask good questions.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux