
The report files are by default stored under /var/log/sa or /var/log/sysstat depending upon your distribution: ~]# ls -l /var/log/sa/sa* You can further modify the cron job based on your requirement. # Generate a daily summary of process accounting at 23:53 # Run system activity accounting tool every 10 minutes To get the details of cron job configured by sar you can check /etc/cron.d/sysstat: ~]# cat /etc/cron.d/sysstat We also have a cron job to create a summary of all the statistics in the midnight for every day. CPU, network, memory, disk etc at an interval of 10 minutes. Sar is by default configured to collect system statistics for all the resource i.e. It will enable sar command to collect system activity information. Use any of the text editors and replace the line (ENABLED="false") with "true" like below. You can do this by editing the file /etc/default/sysstat.

How to enable sar for collecting system activityĪfter installing sysstat, you need to enable sar service to collect system activity information. Install sar on Ubuntu, Debian, and Linux Mint $ sudo apt install sysstat Install sar on CentOS, Fedora and RHEL, Rocky Linux, Alma Linux $ sudo yum install sysstat If sar is not already installed in the system, you can use the following command to install it. It generates the report in the output, which can also be saved in the file. sar command displays the average statistics for the time since the system was started. sar collects, reports, or saves system activity information like CPU utilization, memory usage, I/O devices usage in the Linux system. Sar is the short form for System Activity Report. sar command to display power management statistics Report statistics for a given interrupt with sar command Display report about kernel tables using sar command sar command to report task creation and system switching activity Extract reports from file with sar command

Display queue length and load averages using sar command sar command to display block devices statistics Display all network statistics using sar command

sar command to display network statistics sar command to display filesystems statistics sar command to display memory swapping statistics sar command to display M reports for every N seconds sar command to view swap space utilization statistics sar command to display statistics for the specified processor Display I/O and transfer rate statistics using sar command sar command to display memory utilization statistics sar command to report CPU utilization for each N seconds Display CPU utilization statistics with sar command How to enable sar for collecting system activity.
