Member-only story

100 Days of DevOps — Day 56-Debugging Performance Issue using SAR

Prashant Lakhera
4 min readApr 7, 2019

Welcome to Day 56 of 100 Days of DevOps, Focus for today is Debugging Performance Issue using SAR

What is SAR?

SAR collect, report, or save system activity information. It’s a utility used to collect and report system activity. It collects data relating to most core system functions and writes those metrics to binary data files.

Installing SAR

# yum -y install sysstat
  • To enable SAR on boot
# systemctl enable sysstat (Centos7/RHEL7)

How SAR works

  • When we install a sysstat package it places a file in /etc/cron.d/sysstat
# cat /etc/cron.d/sysstat# Run system activity accounting tool every 10 minutes*/10 * * * * root /usr/lib64/sa/sa1 1 1# 0 * * * * root /usr/lib64/sa/sa1 600 6 &# Generate a daily summary of process accounting at 23:5353 23 * * * root /usr/lib64/sa/sa2 -A

This file setup two cron jobs

  • 1 job to record statistics every 10 minutes.
  • 2 job to write the binary sa\#\# file to a text sar\#\# file once a day (typically right before midnight).

Additional config can be placed in a configuration file(/etc/sysconfig/sysstat)

--

--

Prashant Lakhera
Prashant Lakhera

Written by Prashant Lakhera

AWS Community Builder, Ex-Redhat, Author, Blogger, YouTuber, RHCA, RHCDS, RHCE, Docker Certified,4XAWS, CCNA, MCP, Certified Jenkins, Terraform Certified, 1XGCP

No responses yet