CentOS 7
Sponsored Link

SysStat : Install2015/02/18

 
Install SysStat to enable system monitoring.
[1] Install SysStat.
[root@dlp ~]#
yum -y install sysstat
[root@dlp ~]#
systemctl start sysstat

[root@dlp ~]#
systemctl enable sysstat

[2] Logging is executed by cron's setting like follows.
* Logs are stored in /var/log/sa/sa** per 10 minutes with /usr/lib64/sa/sa1 command.
* The Statics of a day is generated at 23:53 every day to /var/log/sa/sar** with /usr/lib64/sa/sa2 command.
[root@dlp ~]#
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:53
53 23 * * * root /usr/lib64/sa/sa2 -A
[3] If you'd like to change some settings of SysStat, the configuration file is located like follows.
[root@dlp ~]#
vi /etc/sysconfig/sysstat
# sysstat-10.1.5 configuration file.

# How long to keep log files (in days).
# If value is greater than 28, then log files are kept in
# multiple directories, one for each month.
HISTORY=28

# Compress (using gzip or bzip2) sa and sar files older than (in days):
COMPRESSAFTER=31

# Parameters for the system activity data collector (see sadc manual page)
# which are used for the generation of log files.
# *note

SADC_OPTIONS="-S DISK"

# *note : valid options
INT     ⇒  System Interrupts
DISK    ⇒  Block Devices
SNMP    ⇒  SNMP statistics
IPV6    ⇒  IPv6 statistics
POWER   ⇒  Power Management statistics
ALL     ⇒  All of the above
XDISK   ⇒  DISK + Partition statistics
XALL    ⇒  All of the above (ALL + XDISK)
Matched Content