About iostat
有时候在Linux上,可能会出现如下的情况:
1 2 3 |
[root@webserver ~]# iostatus -bash: iostatus: command not found [root@webserver ~]# |
这是因为找不到iostat的命令的原因。
在Linux中,iostat是由系统包:sysstat提供的。
1 2 3 |
[root@webserver ~]# rpm -qf /usr/bin/iostat sysstat-7.0.2-12.el5 [root@webserver ~]# |
使用YUM或者“rpm -ivh xxx”,或者其他的任何方式安装sysstat即可。
YUM:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
[root@webserver ~]# yum list | grep sysstat This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. sysstat.x86_64 7.0.2-12.el5 Server [root@webserver ~]# [root@webserver ~]# yum install -y sysstat Loaded plugins: product-id, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package sysstat.x86_64 0:7.0.2-12.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================== Installing: sysstat x86_64 7.0.2-12.el5 Server 187 k Transaction Summary ======================================================================================================================================================== Install 1 Package(s) Upgrade 0 Package(s) Total download size: 187 k Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : sysstat 1/1 Installed: sysstat.x86_64 0:7.0.2-12.el5 Complete! [root@webserver ~]# |
安装成功后,iostat就可以正常的使用了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@webserver ~]# iostat -V sysstat version 7.0.2 (C) Sebastien Godard [root@webserver ~]# [root@webserver ~]# iostat Linux 2.6.18-371.el5 (webserver) 08/20/2014 avg-cpu: %user %nice %system %iowait %steal %idle 4.22 0.09 1.85 0.84 0.00 93.00 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 3.37 53.74 131.72 2517208 6169787 sda1 0.00 0.04 0.00 2081 59 sda2 3.36 53.65 131.72 2513090 6169560 sda3 0.00 0.03 0.00 1613 168 sr1 0.02 0.49 0.00 22788 0 [root@webserver ~]# |