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`.

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.

2 Replies

  1. Other things I found on the way,

    1. HOW TO: Install/configure/collect System Activity Report (SAR) on Linux, from Informatica, very sure about using cron, cool.
    2. Sysstat: howto deployment and configuration guide for linux, very comprehensive, makes it clear that one needs to load the crontab jobs. Weak on Debian and it is old.
    3. The system activity reporter (sar) CLI, how to install, including the conf. file enable hack, but CLI only, also Collect and report Linux System Activity Information with sar, how to install and browse the log files, weak on enabling the log writer. I  also found Working with sysstat and sar at the urban penguin, mainly about the commands.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.