一篇文章整理Linux服务器性能测试工具脚本(服务器评测必备工具集)

运维软件641字数 2660阅读8分52秒阅读模式

市面上提供云服务器的服务商太多太多,那对于我们选择的服务器商家的产品如何评测性能呢?总不能都听一些评测网站的描述。毕竟不同的用户体验的数据和不同地区用户,甚至不同的时间选择的同一个商家的性能也是不同的。最好的方法还是我们自己亲身体验进行评测。

在这篇文章中,老乐准备通过整理网上开源的优秀的Linux服务器性能测试脚本,并且亲自找一台服务器运行测试脚本的使用。如果我们以后有服务器测试的,可以通过这里找到需要的脚本。而且这里的脚本我们也会不定期的更新整理。

1、SuperSpeed 三网测速脚本

bash <(curl -Lso- https://git.io/J1SEh)
## 或者
bash <(curl -Lso- https://raw.githubusercontent.com/sunpma/Speedtest/master/speedtest.sh)

选择一个安装方法在服务器执行。

SuperSpeed 三网测速脚本

2、柠檬测速脚本

wget -qO- http://ilemonra.in/LemonBenchIntl | bash -s full

来自柠檬测试的脚本,这是完整的脚本,也可以根据需要分开测试。

# 磁盘测试(快速测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --dtfast

# 磁盘测试(完整测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --dtfull

# 宽带测试(快速测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --spfast

# 宽带测试(完整测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --spfull

# Traceroute测试(快速测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --trfast

# Traceroute测试(完整测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --trfull

# CPU基准测试(快速测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --sbcfast

# CPU基准测试(完整测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --sbcfull

# 内存基准测试(快速测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --sbmfast

# 内存基准测试(完整测试模式)
bash <(wget -qO- https://ilemonra.in/LemonBenchIntl) --sbmfull

作者来自:https://blog.ilemonrain.com/linux/LemonBench.html

3、跑分性能跑分测试

一般我们看到的服务器可能内存、硬盘、带宽相差不大,但是CPU的相差也是影响服务器速度和性能的,这里我们可以通过CPU性能测试脚本。通过跑分测试。

wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh && chmod +x unixbench.sh && ./unixbench.sh
# 或者
wget --no-check-certificate https://cdn.jsdelivr.net/gh/teddysun/across/unixbench.sh && chmod +x unixbench.sh && ./unixbench.sh

或者用这个脚本:

wget --no-check-certificate http://tools.laobuluo.com/tools/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh

跑分时间有点长,需要等待时间比较长。

4、Yet Another Bench Script

这个脚本可以可测试服务器基本信息、硬盘速度、网络带宽、CPU跑分等。比如FIO硬盘读写速度。

curl -sL yabs.sh | bash

Yet Another Bench Script

5、一键媒体兼容测试脚本

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

通过脚本可以测试服务器是否兼容流媒体运行。

6、服务器回程线路测试

wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
bash testrace.sh

通过脚本测试国内节点的回程。

7、PING延迟速度测试

PING速度测试,我们可以用本地电脑的PING,或者用在线工具。

https://ping.pe
https://tool.chinaz.com
https://tools.ipip.net/newping.php

这三个都是可以用到的。

PING延迟速度测试

同时,在这个工具可以看到节点的路由去程。

8、路由去程测试脚本

https://tools.ipip.net/traceroute.php

9、综合脚本测试工具

wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh

这个脚本比较齐全。这个脚本是来自 https://github.com/BlueSkyXN/SKY-BOX 也是整合来自网上的,功能比较多,需要可选调用。

比如可以一键安装BBR、包括可以按照SWAP扩展。

10、一键综合测试脚本

wget https://raw.githubusercontent.com/oooldking/script/master/superbench.sh
chmod +x superbench.sh
./superbench.sh

总结,这里整理的适合Linux服务器VPS主机性能测试的脚本。如果我们有需要测试服务器的话应该是可以用到的。

PS:这些脚本来自网上收集,感谢这些开发者提供。

 
麦子
  • 本文由 麦子 发表于 2022年12月11日 11:03:12
  • 转载请务必保留本文链接:https://www.idcxen.com/linux-test-tools.html
  • 服务器性能测试
  • Linux性能测试
  • 服务器性能工具