I want to ensure that the logs written, have the correct timestamp.

So, when ntpd completes the sync (ntpq -c rv displays sync_ntp), I want to restart rsyslogd. But I am not finding any hooks/config to do this!

Also, I am not sure, if I should be doing this in ntpd or rsyslog config (if possible)?

Any help, or workarounds to achieve this?

  • 2
    Are you sure you need to do that? Why wouldn't rsyslog just begin using the new time after it had been set?
    – Celada
    Dec 22, 2014 at 18:37
  • After ntpd synced the time, I was still seeing that the logs in /var/log/syslog was showing older timestamps, and rsyslogd restart fixed it. But, I wanted to do it automatically, rather than manually. Or, I'm not sure if I'm missing some config in rsyslogd!
    – Ani
    Dec 23, 2014 at 3:57


You must log in to answer this question.

Browse other questions tagged .