Sysstat - collect system stats

The sysstat service is responsible for the regular collection of system performance information.

Through the use of cron and sadc (System Activity data collector), sysstat gathers SAR data at n minute intervals daily.

The service has little impact on overall server performance.

The default sysstat configuration overwrites collected performance information every 7 days.

Sysstat is provided as part of the sysstat package – it also provides useful system performance gathering utilities including; mpstat, iostat and sar.


Service: /etc/init.d/sysstat start|stop

Configuration File: /etc/sysconfig/sysstat

Log location: /var/log/sa/


server1# cat /etc/default/sysstat

#

# Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat

# and /etc/cron.daily/sysstat files

#

# Should sadc collect system activity information Valid values

# are "true" and "false". Please do not put other values, they

# will be overwritten by debconf!

ENABLED="true"


Change History Size:

#grep HISTORY /etc/sysstat/sysstat

HISTORY=7


server1# cat /etc/cron.d/sysstat
# The first element of the path is a directory where the debian-sa1
# script is located
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin

# Activity reports every 10 minutes everyday
#5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
#Enable cron to collect data for every 10 minutes
*/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1

# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2

Command to retrieve data:
#sar
#sar -r -s 10:00:00 -e 12:00:00
#sar -f /var/log/sysstat/sa10 -b

“-P ALL” indicates that it should display statistics for ALL the individual Cores.
-r Memory Free and used
-S Free swap memory usage
-b I/O Activities
-d Block Device usage 
sar -w 1 3 Content switch per second
-q run queue and load average

Comments

Popular posts from this blog

Cloudbees FlowServer - Debug

PIP Errors and Fix

Terraform Basics