Today, sar
, it seems is not part of the Debian distros, one needs to install the package sysstat
.
Actually Raspbian has it installed and the CLI commands work, the question is how to set up the collector. NB the Debian file locations have been hard to find and the documentation suggests it runs through cron
and not a specific daemon, so no systemd
. Later reading suggests that systemd
is used on Ubuntu 22.04 and that cron
silent fails, which is what I discovered. For more about cron see cron jobs and crontab
The Raspbian and Ubuntu implementations may be different.
SAR & sysstat
Until sometime in 2022, the advice was to install the package, enable by editing its conf file, upload the crontab to the cron daemon. However at some point in 2022, it became necessary to use dpkg-reconfigure and systemd
and not the cron files, which don’t fucking work on Ubuntu. Here is the Ubuntu documentation page from serverworld, and here is ubuntu’s man sadc and man sar. The database is held in /var/log/sysstat
. I wrote a blog snip with step-by-step instructions on installing `#sar` on #Raspbian buster & #Ubuntu22.04 LTS to run with `#systemd`. https://wp.me/pauVx4-1Oz
Graphing & Charting
Here’s a web charting solution. Check out Ksar, a Java charting app, which I now have working, it’s rather cool, need to remember we are looking for bad events. For ksar, you need Java, I found this, Installing Java on Ubuntu. KSAR requires write access to its log directory and is likely to be run as non-root. It is best invoked via its command line request. I am also exploring an alternative chart writer, see GNUplot on this wiki.
On Cron
While checking all this out, I came across this,how to view and read cron logs on ubuntu, debian and centos at betterstack. Cron logs itself in the syslog.
Other things I found on the way,