(See bug #296741, where this started) I'm using vixie-cron-4.2-2.fc8 and rsyslog-1.19.2-1.fc8. I also have vnstat installed, which has a cron job that runs every 5 minutes. I have confirmed that the job does run every 5 minutes, as expected, but the the logging messages from this job have the wrong timestamps: Sep 24 08:01:01 localhost CROND[23396]: (root) CMD (run-parts /etc/cron.hourly) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 08:05:01 localhost CROND[23410]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:01:01 localhost CROND[23552]: (root) CMD (run-parts /etc/cron.hourly) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Sep 24 09:05:01 localhost CROND[23566]: (vnstat) CMD (/usr/sbin/vnstat.cron) Note that the pid is also wrong.
Just FYI, -e as parameter to rsyslogd looks better. Either set this as default or really fix this problem...
Some extra info: vixie-cron uses the following calls for logging: if (!syslog_open) { openlog("CROND",LOG_PID,LOG_CRON); syslog_open = 1; } syslog(LOG_INFO,"(%s) %s (%s)", username, event, detail) So. Every 5 minutes, we're getting the same syslog() call from vixie-cron. And turning on the "print every message" flag fixes the problem. So it's obviously a bug in the ReduceRepeat code. I think using -e is a good workaround until we can be sure this is fixed.
For the record, this is still unfixed in upstream rsyslog-1.19.6.
Created attachment 204961 [details] Proposed patch This patch corrects the duplicated message suppression.
Fix confirmed with rsyslog-1.19.6-2.fc8. We should make sure that patch gets upstream.
Rainer, see the attached patch for the duplicated message suppression.
I applied the patch I received via mail yesterday, its now in CVS.