sysstat安装升级

背景:所有主机要求纳入it监控中,监控软件sysstat能实现主机基础性能的采集。sar -V检查原版本为9.0.4,不能满足要求升级为11.5.5

 

sysstat安装

安装前需确认系统是否已安装gcc,运行如下命令,redhat5以上版本使用自带的gcc即可:
 


1.删除原有老版本sysstat
[root@node-x]# rpm -e --nodeps sysstat
2.解压sysstat源码
[root@node-x]# xz -d sysstat-11.5.5.tar.xz
[root@node-x]# tar xf sysstat-11.5.5.tar
3.安装前环境监测
[root@node-x]# cd sysstat-11.5.5
[root@node-x sysstat-11.5.5]# ./configure
.
Check programs:
.
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
……
环境未具备,程序返回结果会报错,这里正常
4.编译安装sysstat源码
[root@node-x sysstat-11.5.5]# sa_lib_dir=/usr/lib/sa    \
sa_dir=/var/log/sa        \
conf_dir=/etc/sysconfig   \
./configure --prefix=/usr \
--disable-file-attr && make && make install

5.设置sysstat全局变量及开机启动
ln -s /安装路径/sysstat-11.5.5/sysstat  /usr/local/bin/
ln -s /安装路径/sysstat-11.5.5/sysstat  /etc/init.d/sysstat
chkconfig --add sysstat
chkconfig --list | grep sysstat
6.手动启动sysstat
[root@node-x sysstat-11.5.5]# /etc/rc.d/init.d/sysstat start
Calling the system activity data collector (sadc)... 
查看下是否可用

sar -u 1 5



猜你喜欢

转载自blog.csdn.net/qq_34485930/article/details/80864016