On 24/02/2021 14:17, mick wrote:
On Tue, 23 Feb 2021 18:15:26 +0000 steve-ALUG@hst.me.uk allegedly wrote:
My *buntu server runs a mail server. At 00:00 on some days, it complains that it can't reach the spam analyser or the virus analyser, despite the fact that they're still running and always have been, as far as I can tell.
Other than stopping up to see what's running at midnight, is there a way of monitoring what's running at a particular time. I know you can see what's slowing things down at boot time using "system-analyze blame", or using pybootchartgui. Is there a way to do something like this around midnight?
Also, of the top of your collective heads, can you think of any services update or hog processor at 00:00.
Steve
What (if anything) does syslog say? Have you checked your (r)syslog.conf to see where cron (or any odd daemon) is logging?
Mick
Thanks Mick,
That's a start. rsyslog.conf has no uncommented lines for cron, so cron logs to syslog.
Syslog says, the last time the error happened,
00:35 systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab... 00:36 exim4: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken 00:36 systemd[1]: Starting exim4-base housekeeping... 00:36 systemd[1]: Starting Daily man-db regeneration... 00:37 systemd[1]: fstrim.service: Succeeded. 00:37 systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab. 00:37 exim[339807]: 2021-02-22 00:37 MAIL_HEADER_ID failed to write to main log: length=91 result=-1 errno=9 (Bad file descriptor) 00:37 exim[339807]: write failed on panic log: length=116 result=-1 errno=9 (Bad file descriptor) 00:37 systemd[1]: exim4-base.service: Succeeded. 00:37 systemd[1]: Finished exim4-base housekeeping. 00:37 systemd[1]: Starting Rotate log files...
So a shed-load of things were getting started. These seem to have been started by systemd using config files in /etc/systemd/system/timers.target.wants
Some of the systemd timers specify a time to run, the rest don't and say something like daily. The daily entries are started at 00:00, so I guess systemd is trying to run multiple jobs a the same time.
I shall try changing the OnCalendar=daily to OnCalendar=*-*-* 01:09:00 to see if it works better at a different time.
Thanks for starting me in the right direction. I shall see where it leads.
I didn't know systemd ran scheduled tasks too!
Steve