Install iostat and mpstat

Source: Internet
Author: User

During data synchronization and transmission today, if you want to use the iostat command to monitor the I/O status of the disk, this package cannot be found. This package is not installed by default. Haha, there is no way to install it on your own.
 
[Root @ testhost ~] # Iostat
-Bash: iostat: command not found

Find the sysstat package in the system disk and install it using the following command. The sysstat package contains iostat, mpstat, sar, and sa.
[Root @ testhost ~] # Rpm-ivh sysstat-7.0.2-3.el5.x86_64.rpm
Warning: sysstat-7.0.2-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: sysstat ####################################### #### [100%]
[Root @ testhost ~] #

Run the command to test the installation.
[Root @ testhost ~] # Sar-u 10
Linux 2.6.18-194. el5 (testhost) 09/08/2011

At 09:05:14 CPU % user % nice % system % iowait % steal % idle
09:05:24 all 0.00 0.00 0.01 0.04 0.00 99.95
Average: all 0.00 0.00 0.01 0.04 0.00

[Root @ testhost ~] # Iostat
Linux 2.6.18-194. el5 (testhost) 09/08/2011

Avg-cpu: % user % nice % system % iowait % steal % idle
16.92 0.06 3.02 1.06 0.00 78.94

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
Sda 2.05 35.89 20.21 1338572 753712
Sda1 2.05 35.83 20.21 1336522
Sda2 0.00 0.04 0.00 0
Sdb 374.27 52740.63 7324.86 1967243416 273219624
Sdc 375.21 52741.08 7328.37 1967260216
Sdd 376.82 52740.83 7326.12 1967250984 273266616
Md0 1804.93 57.26 14434.28 2135842

[Root @ testhost ~] # Mpstat
Linux 2.6.18-194. el5 (testhost) 09/08/2011

At 09:12:40 CPU % user % nice % sys % iowait % irq % soft % steal % idle intr/s
09:12:40 all 16.68 0.05 2.69 1.04 0.08 0.22 0.00 79.25 2625.85

Brief description of Linux iostat command output

Linux iostat command

Linux iostat command details

Cacti adds iostat to monitor disk I/O

Mpstat

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.