+3 votes
in Programming Languages by (51.8k points)

I installed sysstat on my Debian 11 VPS to monitor the system performance. However, when I run the sar command, it does not show any report. I have enabled sysstat in /etc/default/sysstat. It was working fine on Debian 10. How can I fix it?

1 Answer

+3 votes
by (281k points)
selected by
Best answer

You need to make a small change in the file /etc/cron.d/sysstat. You need root access to make these changes. 

"debian-sa1" has become only "sa1" in Debian 11. "sa1" collects and stores binary data in the system activity daily data file. So, you need to replace "debian-sa1" with "sa1" in the file.

  • Open the file /etc/cron.d/sysstat; you will find lines similar to the following lines.

# Activity reports every 10 minutes everyday
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2

  • Replace "debian-sa1" with "sa1"
  • Restart sysstat using command "systemctl restart sysstat".
It should fix the issue, and the sar command should show the report.

Related questions