How to configure sysstat


#1

How to configure sysstat

Context

Aerospike’s Collectinfo tool requires that sysstat be installed in order to retrieve useful system stats from iostat, mpstat and sar…

Installing sysstat binaries:

Ubuntu and Debian systems

sudo apt-get -y install sysstat 

Centos and RHEL systems

sudo yum -y install sysstat

Edit sysstat cron file and set to a 1 minute interval

vi /etc/cron.d/sysstat


cat /etc/cron.d/sysstat 
# Run system activity accounting tool every 10 minutes
*/1 * * * * root /usr/lib64/sa/sa1 1 1


Restart the sysstat service:

sudo systemctl restart sysstat.service

or

sudo service sysstat restart

Validate that the tools work:

run iostat

iostat -x 1

Output:

[vagrant@localhost ~]$ iostat -x 1
Linux 2.6.32-642.11.1.el6.x86_64 (localhost.localdomain) 	03/08/2017 	_x86_64_	(2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1.49    0.00    4.63    2.48    0.00   91.40

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda              30.48    41.42  236.54    4.72 52537.04   368.96   219.29     0.14    0.58    0.57    0.66   0.33   7.92
dm-0              0.00     0.00  260.39   46.08 52492.05   368.68   172.48     0.24    0.79    0.60    1.88   0.26   7.89
dm-1              0.00     0.00    1.44    0.00    11.53     0.00     8.00     0.00    0.21    0.21    0.00   0.11   0.02


Notes

Reference

Keywords

sar,sysstat,iostat

Timestamp

02/22/17