Open opty77 opened 10 months ago
When filing an issue report. Please include in the description what you believe to be the issue. What may be obvious to you is maybe not obvious to others.
In the initial example the first -- MARK --
following daemon restart appears after about 11 minutes regarding previous message and the second one even after about one minute.
In the next example the first -- MARK --
appears almost right away after about 30 seconds regarding previous message and the second one after about 18 minutes. Oh well, quite close to 20 minutes of the default interval.
And in the final example the first -- MARK --
appears again almost right away after about 30 seconds regarding previous message, the second one after about 100 seconds and the third one after about 30 seconds.
I wouldn't expect such short actual intervals.
It seems that at least messages from sudo
, crond
and kernel
don't reset the timer for -- MARK --
.
I should have already mentioned that yesterday but those -- MARK --
s almost right away following daemon restart made me doubt.
Since I don't use MARK in my setups at all, the following is a speculative patch:
diff --git a/src/syslogd.c b/src/syslogd.c
index 68040fe..e0a637f 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1679,8 +1679,22 @@ static void logmsg(struct buf_msg *buffer)
/* don't output marks to recently written files */
if (buffer->flags & MARK) {
- if (timer_now() - f->f_time < MarkInterval)
+ switch (f->f_type) {
+ case F_CONSOLE:
+ case F_FILE:
+ case F_FORW:
+ case F_PIPE:
+ case F_TTY:
+ case F_USERS:
+ case F_WALL:
+ /* relevant log targets that set f->f_time */
+ if ((timer_now() - f->f_time) < MarkInterval)
+ continue;
+ break;
+ default:
+ /* skip --MARK-- for other log targets */
continue;
+ }
}
/*
@troglobit: Thanks but unfortunately it didn't help:
2024-04-25T14:45:30.687912+02:00 vodopnik syslogd 1952 - - exiting on signal 15
2024-04-25T14:45:30.765371+02:00 vodopnik syslogd 26337 - - syslogd v2.5.2: restart.
2024-04-25T14:46:00.766331+02:00 vodopnik syslogd 26337 - - -- MARK --
OK, that's unfortunate, because I cannot reproduce your issue at all. Is there anything special about your configuration you can think of?
Most probably just ;RFC5424
in /etc/syslog.conf
so far.
OK. So no pipes or alerting users pure similar odd stuff then. Alright.
And you're on Slackware, right, with a custom kernel?
Indeed.
Just for sure: Have you used any 32-bit system too when trying to reproduce?
No. All 32-bit systems have aged out in all my environments.
DISCLAIMER: Nothing fatal, just nice to become fixed if confirmed. :-)
Upgrade from 2.5.0:
Upgrade from 2.3.0:
Another upgrade from 2.3.0:
First and third
-- MARK --
in the very last example may relate to https://github.com/troglobit/sysklogd/blob/3332c550f1a68393daec5d64cd81f3b7674c0af5/man/syslogd.8#L627-L641 ?