Score:0

sar service has stopped collecting data

gb flag

We had sar working on our Ubuntu server, but did some work on the server and now it's stopped logging to the day's logfile.

sar -b 5 5

This indicates that sar is alive, and monitoring data, but

ubuntu@testing:/var/log/sysstat$ sar

outputs:

Linux 5.4.0-1063-azure (server)     02/22/22    _x86_64_    (4 CPU)

10:22:05     LINUX RESTART  (4 CPU)

10:22:46     LINUX RESTART  (4 CPU)

10:24:25     LINUX RESTART  (4 CPU)

16:34:04     LINUX RESTART  (4 CPU)

The cron and the sysstat config have not changed.

*/1 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

Why isn't stats data getting added to the log?

Score:3
co flag

Comparing 2 installations, one is Debian 11 that was upgraded from Debian 10, and the other is a fresh Debian 11, both using systemd:

  • on Debian 10 then 11, I already have sysstat-collect and sysstat-summary enabled
  • on fresh Debian 11, I don't

So, if you're using systemd, you should reconfigure sysstat that will run through systemd and not through crontab:

dpkg-reconfigure sysstat

Select "Yes".

Editing /etc/default/sysstat directly (as I did until now) is a mistake: it doesn't update systemd files.

Note that you'll see /etc/default/sysstat updated to ENABLED="true", but the cron won't run anymore (systemd will trigger it as expected).

You can check everything is fine using:

systemctl status sysstat-collect.timer
systemctl status sysstat-summary.timer

which should reply with «Active: active (waiting)»

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.