Linux下iostat的安裝

來源:互聯網
上載者:User

今天在做資料同步傳輸的時候,想要使用iostat命令來監控磁碟的IO情況,使用時發現找不到,系統預設沒有安裝這個包。呵呵,沒有辦法只好自己動手裝了。
 
[root@testhost ~]# iostat
-bash: iostat: command not found

在系統觀盤中找到sysstat包,然後使用下面的命令安裝,sysstat包中包括iostat,mpstat,sar,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 ~]#

安裝後,使用命令測試。
[root@testhost ~]# sar -u 10
Linux 2.6.18-194.el5 (testhost)         09/08/2011

09:05:14 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle
09:05:24 PM       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     99.95

[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     753712
sda2              0.00         0.04         0.00       1626          0
sdb             374.27     52740.63      7324.86 1967243416  273219624
sdc             375.21     52741.08      7328.37 1967260216  273350832
sdd             376.82     52740.83      7326.12 1967250984  273266616
md0            1804.93        57.26     14434.28    2135842  538403384

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

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.