CentOS 7.6使用yum安装stress,源码安装stree-ng 0.15.06,源码安装sysstat 12.7.2

cat /etc/redhat-release看到操作系统的版本是CentOS Linux release 7.6.1810 (Core)uname -r可以看到内核版本是3.10.0-957.21.3.el7.x86_64

yum install stress sysstat -y安装stress和sysstat。

使用pidstat -u 5 1没有%wait项:

原因是CentOS 7仓库中sysstat的版本太低了。接下来使用源码进行编译和安装。https://github.com/sysstat/sysstat是sysstat的源码仓库。

sysstat v12.7.2源码安装

1.wget https://github.com/sysstat/sysstat/archive/refs/tags/v12.7.2.tar.gz先下载源码。
'v12.7.2.tar.gz' saved [1488780]是下载完成标志。

2.tar xf v12.7.2.tar.gz进行解压。

3.cd sysstat-12.7.2/进入到sysstat-12.7.2------源代码目录下。

4../configure --enable-install-cron执行configure文件,此步骤有两个功能:

1.选定编译特性;

2.检查编译环境,是否有编译时所需的库,以及库的版本是否满足编译的需要等。

显示下方的信息就是完成。

5.make && make install编译安装。

显示下方信息就是完成了。

stree-ng V 0.15.06源码安装

1.wget https://github.com/ColinIanKing/stress-ng/archive/refs/tags/V0.15.06.tar.gz下载源码。

2.tar xf V0.15.06.tar.gz解压。

3.cd stress-ng-0.15.06/进入源码目录。

4.make编译。

如下图完成了。

4.make install进行安装。

想要使用stress-ng -i 1 --hdd 1 --timeout 600模拟大的IO压力,却报错:

c 复制代码
stress-ng: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

使用yum -y install libatomic安装libatomic。

stress-ng -i 1 --hdd 1 --timeout 600再次执行,正常执行。

内容来源于极客时间《Linux 性能优化实战》

相关推荐
愚润求学1 小时前
Linux开发工具——gcc
linux·服务器·开发语言
照书抄代码1 小时前
Linux中用gdb查看coredump文件
linux·运维·服务器
czhc11400756631 小时前
Linux2 CD LL hostnamectl type mkdir dudo
运维·服务器
一大Cpp1 小时前
随笔1 认识编译命令
linux·opencv·ubuntu
ℳℓ白ℳℓ夜ℳℓ2 小时前
Linux网络应用层自定义协议与序列化
linux·运维·服务器
江沉晚呤时2 小时前
如何深入理解C#中的备忘录模式(Memento Pattern)设计模式
运维·服务器·数据库·c#·.netcore
23zhgjx-hyh2 小时前
IS-IS认证
运维·服务器·网络
JohnYan2 小时前
工作笔记 - PHP系统升级到7.4
linux·后端·php
日出等日落2 小时前
CasaOS小主机本地安装1Panel运维面板结合内网穿透移动端远程运维
运维
RLG_星辰2 小时前
第二章日志分析-mysql应急响应笔记
运维·数据库·mysql·应急响应·玄机