Differences between revisions 9 and 10
Revision 9 as of 2023-03-31 15:42:17
Size: 2173
Comment:
Revision 10 as of 2023-03-31 15:47:58
Size: 2817
Comment:
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
== Enable Sar ==
Technically is sar the program that collect the information but packagers decided to handle this throuhg sysstat name.

Once you install sysstat package edit the file /etc/default/sysstat and change the string ENABLED="false" to ENABLED="true".

After execute the following commands:
{{{{
systemctl start sysstat
systemctl enable sysstat
}}}}

You can check if sysstat or sar is running with the following command:
{{{{
systemctl status sysstat
}}}}

You can check if sar is storing the performance information on the following directory /var/log/sysstat, you will get a file with the format sa$dayofthemonth.

Translation(s): English - Español ~

(!) Discussion


About

sysstat contains the following system performance tools:

  • sar: collects and reports system activity information;
  • iostat: reports CPU utilization and disk I/O statistics;
  • tapestat: reports statistics for tapes connected to the system;
  • mpstat: reports global and per-processor statistics;
  • pidstat: reports statistics for Linux tasks (processes);
  • sadf: displays data collected by sar in various formats;
  • cifsiostat: reports I/O statistics for CIFS filesystems.

The statistics reported by sar deal with I/O transfer rates, paging activity, process-related activities, interrupts, network activity, memory and swap space utilization, CPU utilization, kernel activities and TTY statistics, among others. Both UP and SMP machines are fully supported.

Installation

apt-get install sysstat

Sar

Sar is set of tools that helps you to collect and report the system activity.

  • sar collects, reports and saves system activity information (see below a list of metrics collected by sar).
  • sadc is the system activity data collector, used as a backend for sar.
  • sa1 collects and stores binary data in the system activity daily data file. It is a front end to sadc designed to be run from cron or systemd.
  • sa2 writes a summarized daily activity report. It is a front end to sar designed to be run from cron or systemd.
  • sadf displays data collected by sar in multiple formats (CSV, XML, JSON, etc.) and can be used for data exchange with other programs. This command can also be used to draw graphs for the various activities collected by sar using SVG (Scalable Vector Graphics) format.

You can schedule via cron or systemd to collect and historize performance and activity data on Debian. Default sampling interval is 10 minutes but this can be changed of course (it can be as small as 1 second).

Enable Sar

Technically is sar the program that collect the information but packagers decided to handle this throuhg sysstat name.

Once you install sysstat package edit the file /etc/default/sysstat and change the string ENABLED="false" to ENABLED="true".

After execute the following commands:

systemctl start sysstat
systemctl enable sysstat

You can check if sysstat or sar is running with the following command:

systemctl status sysstat

You can check if sar is storing the performance information on the following directory /var/log/sysstat, you will get a file with the format sa$dayofthemonth.