Hello Richard,
Am Sun, May 18, 2025 at 02:28:16PM +0100 schrieb Richard Lewis:
> On Sun, 18 May 2025, 14:14 Helge Kreutzmann, <deb...@helgefjell.de> wrote:
> > 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 see no errors, mailq returns without output and with exit code 0,
the exim logs are not showing any errors.

> i can only guess that the email comes from cron, and system's email is now
> being silently lost.

Could be.

> 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)

Made the change and will report.

And don't worry about missing logs, I think I have a few dozen bug
reports open, requesting to add logcheck files, bút almost all
maintainers ignore this and I'm always lagging a bit filtering the
latest messages (and expected errors). 

Greetings

           Helge


-- 
      Dr. Helge Kreutzmann                     deb...@helgefjell.de
           Dipl.-Phys.                   http://www.helgefjell.de/debian.php
        64bit GNU powered                     gpg signed mail preferred
           Help keep free software "libre": http://www.ffii.de/

Attachment: signature.asc
Description: PGP signature

Reply via email to