Re: System Time

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

 



On Tue, Sep 29, 2015 at 06:55:00AM +0200, Berend De Schouwer wrote:
> On Sun, 2015-09-27 at 21:53 +0100, Richard W.M. Jones wrote:
> > On Thu, Sep 24, 2015 at 06:18:24PM +0200, Berend De Schouwer wrote:
> > > I'm currently using a cron script to touch a file every 10 minutes,
> > > and
> > > read that on bootup (before chronyd), and I've added a
> > > 'Requires=touchClock' to some systemd services.
> > 
> > I think you don't need the cron script.  If you make the
> > (reasonable?)
> > assumption that files in /var/log are updated regularly then:
> > 
> > # find /var/log -type f -print0 | xargs -0 stat -c '%Y %n' /var/log |
> > sort -nr | head -1
> > 
> > (You can omit the %n if you don't care about the actual file that is
> > the newest).
> 
> I think systemd systems are supposed to move to journald.  Are there
> still official /var/log files that are intended to remain over the next
> few Fedora releases, and guaranteed to exist and updated?

journald stores files under /var/log ...

> I'm not convinced that depending on a wildcard file is robust long-
> term.  It sounds like a recipe for random failures.
> 
>
> I'm don't think depending on journald is right.  Journald starts on
> initrd before the filesystem is mounted, and then moves the journal
> after / is mounted; so it might be (not confirmed) that
> /var/log/journal/ has a bad timestamp on boot.

... and this doesn't matter because the command above finds the newest
file under /var/log.  If journald writes a file with a 1970-01-01
timestamp it won't be the newest file.

> I think we should.  Especially since it already ships systemd-
> timesyncd.  How do we go about that?

But anyway as systemd-timesyncd was pointed out in the other reply,
and it seems to be doing mostly the same as your technique, I guess we
need to find out if we can use that (probably it's just a matter of
enabling the service?).  systemd has a mailing list:

http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux