All-powerful champion: Linux system performance and use of activity monitoring tool sysstat

Source: Internet
Author: User

All-powerful champion: Linux system performance and use of activity monitoring tool sysstat

Sysstat is a very convenient tool with many system resource monitoring tools for monitoring system performance and usage. A considerable portion of the tools we use on a daily basis come from the sysstat toolkit. It also provides a collection plan that uses cron expressions to develop performance and activity data.

The following table lists the tools included 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 (output separately or by group ).
  • Pidstat: Statistics on running processes/tasks, CPU, memory, and so on.
  • Sar: saves and outputs different system resources (such as CPU, memory, IO, network, and kernel ...) .
  • Sadc: the active data collector used to collect the back-end data of the sar tool.
  • Sa1: The system collects and stores the binary data of the sadc data file, and works with the sadc tool.
  • Sa2: used with the sar tool to generate daily summary reports.
  • Sadf: used to format the output of the sar tool in different data formats (CVS or XML.
  • Sysstat: The man help page of The sysstat tool.
  • Nfsiostat: Network File System (NFS) I/O statistics.
  • Cifsiostat: CIFS (Common Internet File System) statistics.

    Recently (in June 17, 2014), sysstat 11.0.0 (stable version) has been released, and some interesting features have been added, as shown below:

    The pidstat command adds some new options: first, the "-R" option, which will output priority information about policies and task scheduling. Then there is the "-G" option. With this option, we can search for processes by name and list all matching threads.

    The sar, sadc, and sadf commands also provide some functional enhancements in data files. In the past, only "saDD" can be used to name data files. Now you can use the-D option to rename the data file with "saYYYYMMDD". Similarly, the current data file does not have to be placed in the "var/log/sa" directory, we can use the "SA_DIR" variable to define a new directory, which will be applied with the sa1 and sa2 commands.

    Install sysstat in Linux

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

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

    • Http://sebastien.godard.pagesperso-orange.fr/download.html
      1 # wget http://pagesperso-orange.fr/sebastien.godard/sysstat-11.0.0.tar.gz

      Download the sysstat package

      Decompress the downloaded package, go to the directory, and start compilation and installation.

      1 2 # tar -xvf sysstat-11.0.0.tar.gz # cd sysstat-11.0.0/

      Here, you have two methods for compilation and installation:

      A)

      First, you can use iconfig (this will give you great flexibility, you can select/Enter custom values for each parameter)

      1 # ./iconfig

      Sysstat iconfig command

      B)

      Second, you can use standard configure to define all options in the command line. You can run the./configure-help command to list the limited options supported by this command.

      1 # ./configure --help

      Cofigure-help of stsstat

      Here, we use the standard./configure command to compile and install the sysstat toolkit.

      1 2 3 # ./configure # make # make install

      Configure sysstat in Linux

      After compilation, we will see some similar output. Run the following command to view the version of sysstat.

      1 2 3 4 # mpstat -V sysstat version 11.0.0 (C) Sebastien Godard (sysstat <at> orange.fr)
      Update sysstat in Linux

      By default, sysstat uses "/usr/local" as its directory prefix. Therefore, all binary data/tools are installed in the "/usr/local/bin" directory. If your system has installed the sysstat toolkit, the binary data/tool mentioned above may be in the "/usr/bin" directory.

      Because the "$ PATH" variable does not contain the "/usr/local/bin" PATH, you may fail to update it. Therefore, make sure that the "/usr/local/bin" PATH is included in the "$ PATH" environment variable, or before the update, when compiling and uninstalling the old version, set the-prefix option to "/usr ".

      1 2 # yum remove sysstat [On RedHat based System] # apt-get remove sysstat [On Debian based System]
      1 2 3 # ./configure --prefix=/usr # make # make install

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

      1 2 3 4 # mpstat -V sysstat version 11.0.0 (C) Sebastien Godard (sysstat <at> orange.fr)

       

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.