Running a reliable website or service requires more work than simply setting up a Linux server. Additionally, you must keep an eye out for security breaches, performance snags, and resource usage on the active system. Linux exposes a wide range of monitoring features, but these are frequently quite low-level and need a higher-level framework to track efficiently. One such monitoring tool is System Activity Reporter (SAR). We mentioned below are the steps to use System Activity Reporter.

Steps to use System Activity Reporter

Prerequisites

There are a few short points to make before we begin. I hope you’ve already installed all updates if your server is a production server. There are existing articles about updating packages in Linode’s documentation. Step 1: To get started, we’ll first need to install the sar command, which is available in the sysstat package:

Install and Configure sar

The open-source sar program is frequently used, but it’s not included in most Linux distributions. You must install it as part of the sysstat package. This section shows you how to install sar on the Debian/Ubuntu Linux distributions. Step 1: Install sar, if it is not already installed on your system: Step 2: Sar must be enabled before it can begin to collect data. Using your preferred text editor, open the /etc/default/sysstat configuration file, and change the value of ENABLED to true. Step 3: Other sar configuration data is kept in the files /etc/cron.d/sysstat and /etc/sysstat/sysstat. The defaults should work well for you, but at some point you may want to change them. You can modify these files to update your settings. View your current sar settings to verify that the default values work for your desired configuration: Step 4: The most commonly modified variable is the frequency setting for how often sar runs. It is controlled by the line:

Using sar

Step 1: You can run sar both as an interactive program and in shell programs. There are two ways to run sar: Step 2: Run sar using one of its collected data files. Ensure you replace the sa24 with a sar data file that exists on your system. The number corresponds to the day of the month for which the data was collected. The example command displays the cumulative real-time CPU usage of all CPU cores on the 24th day of the current month:

Final Words

We hope you like our article on how to use System Activity Reporter. A lot of information about your computer can be displayed by the System Activity Reporter, which can also save that information to files for subsequent examination. The sysstat package includes this application and any related tools. The software is set to run both at 10-minute intervals and once per day at 23:59 on Debian and the majority of other distributions. Depending on your distribution, one of sar’s two default scripts, sa1 or sa2, runs instead of calling sar directly.

How to use System Activity Reporter - 73How to use System Activity Reporter - 63How to use System Activity Reporter - 37How to use System Activity Reporter - 6