本文轉自(https://blog.csdn.net/qq_31391261/article/details/79419740)
OS:centos6.5
操做步驟:
1)輸入sar命令:sar --help
結果:提示command not found
緣由:未安裝工具使用yum命令安裝, yum install sysstat
說明:(yum也是個工具,若是你的linux系統無yum工具須要自行安裝)
安裝過程,以下:
yum install sysstat過程記錄
[root@besttest ~]# yum install sysstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.aliyun.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sysstat.i686 0:9.0.4-33el6_9.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================================
Installing:
sysstat i686 9.0.4-33el6_9.1 updates 228 k
Transaction Summary
===============================================================================================================================================================================================================================
Install 1 Package(s)
Total download size: 228 k
Installed size: 804 k
Is this ok [y/N]: y
Downloading Packages:
sysstat-9.0.4-33el6_9.1.i686.rpm | 228 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
LoadGenerator-11.00.000-1.i386 has missing requires of libicudata.so
LoadGenerator-11.00.000-1.i386 has missing requires of libicudata.so.36
LoadGenerator-11.00.000-1.i386 has missing requires of libicui18n.so.36
LoadGenerator-11.00.000-1.i386 has missing requires of libicutu.so.36
LoadGenerator-11.00.000-1.i386 has missing requires of libicuuc.so.36
Installing : sysstat-9.0.4-33el6_9.1.i686 1/1
Verifying : sysstat-9.0.4-33el6_9.1.i686 1/1
Installed:
sysstat.i686 0:9.0.4-33el6_9.1
Complete!
2)安裝完成sysstat工具,便可使用sar命令: