Install And Configure Sar And Ksar For Daily Monitoring On Linux And Generate PDF Reports =LINK=
SAR stands for system activity reports, an extremely lightweight, real-time system monitoring tool. SAR can generate daily usage reports for monitoring systems without generating extra load on the system. SAR can be a very handy and powerful utility for any Linux user who wants to monitor system load.
Install and configure sar and ksar for daily monitoring on Linux and generate PDF reports
To check the version[deepak@test1 ]$ sar -V sysstat version 7.0.2 (C) Sebastien Godard Collect sar reports on a daily basis using cron jobs (This entry is made by default as soon as you install sysstat package)[root@test1 ]# cat /etc/cron.d/sysstat # run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib64/sa/sa1 1 1 # generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib64/sa/sa2 -A
Once the sysstat service started then sar will start collecting the data every 10 minutes and generate its report daily. On RHEL 8/ RHEL 9, following systemd file is responsible for collecting and generating reports.
One of the reasons I prefer vmstat to sar is that it gives you the CPU utilization information, and it provides overall monitoring information on memory and I/O. With sar, you need to run separate commands to pull the information. One advantage that sar gives you is the ability to capture daily information and to run reports on this information (without writing your own script to do so). It does this by using a process called the System Activity Data Collector, which is essentially a back-end to the sar command. When enabled, usually through cron (on a default AIX partition, you would usually find it commented out), it collects data periodically in binary format.