Ways to view the system performance of Linux using Sysstat

Source: Internet
Author: User
Tags file system

Sysstat is a very handy tool with a wide range of system resource monitoring tools for monitoring system performance and usage. Quite a few of the tools we use on a daily basis come from the Sysstat toolkit. It also provides a collection plan that uses a cron expression to develop performance and activity data.

The following table is the tool contained in the SYSSTAT package

Iostat: Outputs CPU statistics and input/output (I/O) statistics for all I/O devices.

Mpstat: Detailed information about the CPU (separate output or grouped output).

Pidstat: Statistics about running processes/tasks, CPUs, memory, and so on.

SAR: Save and output different system resources (CPU, memory, IO, network, kernel, etc...) ) For more information.

SADC: A system Activity Data collector used to collect back-end data for SAR tools.

SA1: The system collects and stores the binary data of the SADC data file, which is used in conjunction with the SADC tool

SA2: Use with SAR tools to produce daily summary reports.

SADF: Used to format the output of the SAR tool in different data formats (CVS or XML).

The man help page for the Sysstat:sysstat tool.

Nfsiostat:nfs (Network File System) I/O statistics.

Cifsiostat:cifs (Common Internet File System) statistics.

Recently (on June 17, 2014), Sysstat 11.0.0 (Stable edition) has been released, as well as added some interesting features, as follows:

New options are added to the Pidstat command: First, the "-r" option, which will output priority information about policy and task scheduling. Then the "-G" option allows us to use the name search process and then list all the matching threads.

The SAR, SADC, and SADF commands also bring some enhancements to the data file. You can only use "Sadd" to name a data file in the past. Now using the-D option to rename the data file with "SAYYYYMMDD", the same data file does not have to be in the "Var/log/sa" directory, and we can use the "sa_dir" variable to define the new directory that will be applied to the SA1 and SA2 commands.

Installing Sysstat on Linux systems

In the major Linux distributions, the ' Sysstat ' Toolkit can be installed in the default library. However, the version in the default library is usually a bit old, so we will download the source code package and compile and install the latest version (11.0.0 version).

First, use the connection below to download the latest version of the Sysstat package, or you can use the wget command to download it directly from the terminal.


The code is as follows:

# wget http://pagesperso-orange.fr/sebastien.godard/sysstat-11.0.0.tar.gz

Then unzip the downloaded package, go into the directory, and start compiling the installation

The code is as follows:

# TAR-XVF Sysstat-11.0.0.tar.gz

# CD sysstat-11.0.0/

Here you have two ways of compiling the installation:


First, you can use IConfig (which will give you a lot of flexibility, you can select/Enter a custom value for each parameter)

The code is as follows:



Second, you can use the standard configure to define all the options on the command line. You can run the./configure–help command to list all the restricted options supported by the command.

Copy Code

The code is as follows:


Here, we use the standard./configure command to compile the installation Sysstat Toolkit.

The code is as follows:


# make

# make Install

After the compilation is complete, we will see some output similar to the previous image. Now run the following command to view the Sysstat version.

The code is as follows:

# mpstat-v

Sysstat version 11.0.0

(C) Sebastien Godard (sysstat orange.fr)

Updating the Sysstat in Linux systems

By default, Sysstat uses "/usr/local" as its directory prefix. Therefore, all binary data/tools will be installed in the "/usr/local/bin" directory. If your system already has the SYSSTAT Toolkit installed, the binary data/tools mentioned above may be in the "/usr/bin" directory.

Because the "$PATH" variable does not contain a "/usr/local/bin" path, you may fail to update it. Therefore, make sure that the "/usr/local/bin" path is contained in the $PATH environment variable, or that the-prefix option is specified as "/usr" when the old version is compiled and unloaded before updating.

The code is as follows:

# yum Remove Sysstat [on RedHat based System]

# apt-get Remove Sysstat [on Debian based System]


# make

# make Install

Now, use the '-V ' option of the ' mpstat ' command to view the updated version.

The code is as follows:

# mpstat-v

Sysstat version 11.0.0

(C) Sebastien Godard (sysstat orange.fr)

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.