Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use sysstat to view the system performance of Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use sysstat to check the system performance of Linux". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Sysstat is a very convenient tool with many system resource monitoring tools to monitor the performance and usage of the system. Quite a few of the tools we use on a daily basis come from the sysstat toolkit. At the same time, it provides a collection plan for performance and activity data using cron expressions.

The following table shows the tools included in the sysstat package

Iostat: output statistics for CPU and input and output (Imax O) statistics for all Icano devices.

Mpstat: more information about CPU (individual output or grouped output).

Pidstat: statistics about running processes / tasks, CPU, memory, etc.

Sar: save and output different system resources (CPU, memory, IO, network, kernel, etc.). The details of the

Sadc: the system active data collector, which is used to collect the back-end data of sar tools.

Sa1: the system collects and stores binary data from sadc data files for use with the sadc tool

Sa2: work 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 for the sysstat tool.

Nfsiostat: iUnip O statistics for NFS (Network File System).

Cifsiostat: statistics for CIFS (Common Internet File System).

Recently (June 17, 2014), sysstat 11.0.0 (stable version) has been released, along with some interesting features, as follows:

The pidstat command adds some new options: the first is the "- R" option, which outputs priority information about policy and task scheduling. Then there is the "- G" option, which allows us to search for a process with a name and then list all matching threads.

The sar, sadc, and sadf commands also bring some enhancements to data files. In the past, you can only use "saDD" 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 the new directory, which will be applied with the sa1 and sa2 commands.

Install sysstat on a Linux system

In 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 (version 11.0.0).

First, download the latest version of the sysstat package using the link below, or you can download it directly from the terminal using the wget command.

Http://sebastien.godard.pagesperso-orange.fr/download.html

The code is as follows:

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

Then extract the downloaded package, go to the directory, and start compiling and installing.

The code is as follows:

# tar-xvf sysstat-11.0.0.tar.gz

# cd sysstat-11.0.0/

Here, you have two ways to compile and install:

a)

First, you can use iconfig (this will give you a lot of flexibility, you can select / enter custom values for each parameter)

The code is as follows:

#. / iconfig

b)

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

The code is as follows:

#. / configure-help

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

The code is as follows:

#. / configure

# make

# make install

After the compilation is complete, we will see some output similar to the figure above. Now run the following command to view the version of sysstat.

The code is as follows:

# mpstat-V

Sysstat version 11.0.0

(C) Sebastien Godard (sysstat orange.fr)

Update sysstat in Linux system

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 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. Therefore, make sure that the "/ usr/local/bin" path is included in the "$PATH" environment variable, or that the-prefix option is specified as "/ usr" when compiling and uninstalling older versions before updating.

The code is as follows:

# yum remove sysstat [On RedHat based System]

# apt-get remove sysstat [On Debian based System]

#. / configure-prefix=/usr

# 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)

This is the end of the content of "how to use sysstat to check the system performance of Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report