On Sun, 18 May 2025, 14:28 Richard Lewis, < richard.lewis.deb...@googlemail.com> wrote:
> On Sun, 18 May 2025, 14:14 Helge Kreutzmann, <deb...@helgefjell.de> wrote: > >> Hello Richard, >> Am Sun, May 18, 2025 at 01:18:57PM +0100 schrieb Richard Lewis: >> > On Sun, 18 May 2025, 12:37 Helge Kreutzmann, <deb...@helgefjell.de> >> wrote: >> > >> > > >> > > root@twentytwo:~# cat /etc/cron.d/logcheck >> > > # /etc/cron.d/logcheck: crontab entries for the logcheck package >> > > # These do nothing under systemd because the systemd timer will take >> > > precedence >> > > >> > > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin >> > > MAILTO=root >> > > >> > > @reboot logcheck if [ ! -d /run/systemd/system ] && [ -x >> > > /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi >> > > #2 * * * * logcheck if [ ! -d /run/systemd/system ] && [ -x >> > > /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi >> > > 2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice >> -n10 >> > > /usr/sbin/logcheck; fi >> > > >> > > >> > > And now I get *one* e-mail again. The first had the exim error still, >> > > but the second did not. >> > > >> > >> > makes sense -- there is a lag as then failed weite to paniclog on run >> N is >> > reported by logcheck in run N+1 >> >> Also the 3rd e-mail no longer had the exim entry. >> >> Looks to me as if this was the culprit. >> >> > is this with the systemd unit enabled or disabled? >> >> I did not change anything beyond this. >> >> root@twentytwo:~# systemctl status logcheck >> ◈ logcheck.service - logcheck >> Loaded: loaded (/usr/lib/systemd/system/logcheck.service; static) >> Active: inactive (dead) since Sun 2025-05-18 15:02:09 CEST; 11min ago >> Invocation: deaadb792c564047a561772068245285 >> TriggeredBy: • logcheck.timer >> Docs: man:logcheck(8) >> Process: 2038900 ExecStart=/usr/sbin/logcheck (code=exited, >> status=0/SUCCESS) >> Main PID: 2038900 (code=exited, status=0/SUCCESS) >> Mem peak: 222.8M >> CPU: 3.534s >> >> Mai 18 15:02:01 twentytwo systemd[1]: Starting logcheck.service - >> logcheck... >> Mai 18 15:02:09 twentytwo systemd[1]: logcheck.service: Deactivated >> successfully. >> Mai 18 15:02:09 twentytwo systemd[1]: Finished logcheck.service - >> logcheck. >> Mai 18 15:02:09 twentytwo systemd[1]: logcheck.service: Consumed 3.534s >> CPU time, 222.8M memory peak. >> > > > so you've now got > > - cron is running logcheck > - systemd is also running logcheck > > only one of them sends an email > no other errors > no other messages in the mailq? > > > i can only guess that the email comes from cron, and system's email is now > being silently lost. > > can you check this -- if you add a -R to the cron.d line so it is > > ... nice -n10 /usr/sbin/logcheck -R; .... > > then any emails from cron will have "Reboot" in the subject, and any email > from systemd will not, that would be helpful. > > (youll presumably now only get a logcheck email if there is something in > the log to report, i usually do "logger test" to make sure that happens) > stuud me -- you wont get 2 emails because whoever runs second may not find any new messages to report. and in fact if both cron and systemd are running at the same time onenof them should fail as it cant take the lock. so you cant ever get duplicate reports from having cron and systemd running, so that was never the cause. > > > >