How to Install sysstat on CentOS 5.7 Linux Server

In this post i will show how to install sysstat on Linux CentOS 5.7 server. Sysstat package is on of the method to monitor the linux server. sysstat package contains the sar, iostat and mpstat which are the system performance tools for Linux operating system. The sar command collects and reports system activity information. The iostat command reports CPU utilization and I/O statistics for disks. The mpstat command reports global and per-processor statistics. The statistics reported by sar concern I/O transfer rates, paging activity, process-related activities, interrupts, network activity, memory and swap space utilization, CPU utilization, kernel activities and TTY statistics. All these tools can be schedule via cron to collect and historize performance and activity data. These are the list of sysstat’s available packages :

a) iostat(1) reports CPU statistics and input/output statistics for devices, partitions and network filesystems.
b) mpstat(1) reports individual or combined processor related statistics.
c) pidstat(1) reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc.
d) sar(1) collects, reports and saves system activity information (CPU, memory, disks, interrupts, network interfaces, TTY, kernel tables,etc.)
e) sadc(8) is the system activity data collector, used as a backend for sar.
f) sa1(8) collects and stores binary data in the system activity daily data file. It is a front end to sadc designed to be run from cron.
g) sa2(8) writes a summarized daily activity report. It is a front end to sar designed to be run from cron.
h) sadf(1) displays data collected by sar in multiple formats (CSV, XML, etc.) This is useful to load performance data into a database, or import them in a spreadsheet to make graphs.
i) nfsiostat(1) reports input/output statistics for network filesystems (NFS).
j) cifsiostat(1) reports CIFS statistics.

See also  How to Install and Configure ViewVC for Subversion on CentOS

To install sysstat, simply run the following command :

[root@CentOS57 ~]# yum install sysstat -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.oscc.org.my
 * extras: mirror.oscc.org.my
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.oscc.org.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sysstat.i386 0:7.0.2-11.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                Version                       Repository           Size
====================================================================================================
Installing:
 sysstat                i386                7.0.2-11.el5                  base                182 k

Transaction Summary
====================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 182 k
Downloading Packages:
sysstat-7.0.2-11.el5.i386.rpm                                                | 182 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : sysstat                                                                      1/1

Installed:
  sysstat.i386 0:7.0.2-11.el5

Complete!

To check the installed sysstat’s package using rpm command :

[root@CentOS57 ~]# rpm -qa sysstat
sysstat-7.0.2-11.el5

To see sysstat manual simply run any of the sisgle package command. As an example sa1 :

[root@CentOS57 ~]# man sa1
SA1(8)                        Linux Userâs Manual                       SA1(8)

NAME
       sa1 - Collect and store binary data in the system activity daily data file.

SYNOPSIS
       /usr/lib/sa/sa1 [ interval count ]

DESCRIPTION
       The sa1 command is a shell procedure variant of the sadc command and handles all of
       the flags and parameters of that command. The sa1 command collects and store binary
       data  in  the  /var/log/sa/sadd  file, where the dd parameter indicates the current
       day. The interval and count parameters specify that the record  should  be  written
       count  times  at interval seconds. If you do not specify these parameters, a single
       record is written.

       The sa1 command is designed to be started automatically by the cron command.

EXAMPLES
       To create a daily record of sar activities, place the following entry in your  root
       or adm crontab file:

       0 8-18 * * 1-5 /usr/lib/sa/sa1 1200 3 &

FILES
       /var/log/sa/sadd
              Indicate  the daily data file, where the dd parameter is a number represent-
              ing the day of the month.

AUTHOR
       Sebastien Godard (sysstat  wanadoo.fr)

SEE ALSO
       sar(1), sadc(8), sa2(8), sadf(1), mpstat(1), iostat(1), vmstat(8)

       http://perso.orange.fr/sebastien.godard/

Linux                              JUNE 2006                            SA1(8)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *