Monitoring System Resources Using SAR (System Activity Report)
Monitoring System Resources Using SAR (System Activity Report)
LinuxTechLab.com
Originally published on
LinuxTechLab.com
Once the servers have created & have been deployed to development or production etc,
main task of system admin is to make sure that servers keep running by continuously
monitoring its resource usage like memory utilization, CPU utilization etc with the help
of various utilities. One such utility that is used for monitoring RHEL/CentOS servers is,
SAR.
SAR or System Activity Report is used for monitoring of the resources of a Linus
server. It can be used to generate reports relating to performance of a system i.e CPU
reports, Memory reports, Disk reports etc. It saves reports in the form of log files on the
system.
In this tutorial, we are going to discuss usage of SAR with the help of some examples but
first we will install SAR on our system.
Installation
To install SAR utility on the system, SYSSTAT package is required. To install sysstat , run
$ yum install sysstat
Now start & enable the sysstat service to start using SAR,
$ systemctl start sysstat
$ systemctl enable sysstat
Once the service is active, logs for the current day will be created in /var/log/sa folder
in the file sa15, where 15 is the current date. Files for the older dates will be archived .
We can also change the number of days for which we keep our files by changing the
HISTORY parameter in the sysstat configuration file i.e. /etc/sysconfig/sysstat.
These were some the examples that are used with sar command. For queries/questions,
please use the comment box below.
If you think we have helped you or just want to support us, please consider these :-
Connect to us: Facebook | Twitter | Google Plus
LinuxTechLab.com