Benchy 用于测试服务器性能的 Shell 脚本

简介

Benchy 是 MasonR 的Yet Another Bench Script (YABS)的一个分支,一些 Benchy 代码使用了与 YABS 相同的技术——作者重写了一些片段以使其更高效。

https://github.com/L1so/benchy

特色

  • 服务器基本信息,包括但不限于:
    • 操作系统
    • 中央处理器型号
    • CPU 核心数
    • 使用的虚拟化
    • 磁盘(计数和使用)
    • 内存(计数和使用)
    • 交换大小
  • IPv4 检查
  • IPv6 检查
  • 服务器地理位置
  • 服务器正常运行时间
  • 回退到wgetifcurl未安装(这适用于基于 Debian 的系统,curl默认情况下未安装)
  • POSIX兼容,这意味着理论上它应该适用于所有执行 POSIX 的平台。

安装

wget -qO- https://raw.githubusercontent.com/L1so/benchy/main/benchy | sh

或者

curl -Ls https://raw.githubusercontent.com/L1so/benchy/main/benchy | sh

输出

测试机器:virmach 日本 8.88刀

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Apr 13 01:12:51 2022 from 183.8.134.241
root@EnviousWarped-VM:~# curl -Ls https://raw.githubusercontent.com/L1so/benchy/main/benchy | sh
# # # # # # # # # # # # # # # # # # #
#            Benchy v1.2            #
#   https://github.com/L1so/benchy  #
#        AIO Benchmarking tool      #
# # # # # # # # # # # # # # # # # # #
#       16 Apr 2022 23:38 EDT       #
# # # # # # # # # # # # # # # # # # #

Server Information
---------------------
OS          : Debian GNU/Linux 11 (bullseye)
Uptime      : 4 Days, 23 Hours, 18 Minute, 5 Seconds 
Location    : Japan     
CPU         : AMD Ryzen 9 5900X 12-Core Processor
Core        : 1 @ 3693.062 MHz
AES-NI      : ✔ Enabled
VM-x/AMD-V  : ✔ Enabled
Virt        : kvm       

Disk & Memory Usage
---------------------
Disk        : 9.60 GiB  
Disk Usage  : 1.29 GiB (15% Used)
Mem         : 347.13 MiB
Mem Usage   : 62 MB (18% Used)
Swap        : 255.99 MiB

Disk Performance Check (ext4 on /dev/vda1):
+---------------------------------------------------------------------------+
| Size | Read        | Write       | Total       |       IOPS (R,W,T)       |
+===========================================================================+
| 4k   | 198.39 MB/s | 198.92 MB/s | 397.32 MB/s | 50.8k  | 50.9k  | 101.7k |
| 64k  | 869.20 MB/s | 873.77 MB/s | 1.70 GB/s   | 13.9k  | 14.0k  | 27.9k  |
| 512k | 974.12 MB/s | 1.00 GB/s   | 1.95 GB/s   | 1.9k   | 2.0k   | 4.0k   |
| 1m   | 1.16 GB/s   | 1.24 GB/s   | 2.41 GB/s   | 1.2k   | 1.3k   | 2.5k   |
+---------------------------------------------------------------------------+

Network Performance Test:
+-------------------------------------------------------------------------------------------+
| Prot. | Provider    | Location             | Send            | Receive         | Latency  |
+===========================================================================================+
| IPv4  | Clouvider   | London, UK           | 254 Mbits/sec   | 38.3 Mbits/sec  | 262 ms   |
|       | Airstream   | Wisconsin, USA       | 399 Mbits/sec   | 21.5 Mbits/sec  | 242 ms   |
|       | Uztelecom   | Tashkent, UZB        | 275 Mbits/sec   | 39.3 Mbits/sec  | 231 ms   |
|       | Online.net  | Paris, FRA           | 244 Mbits/sec   | 39.8 Mbits/sec  | 253 ms   |
|       | WebHorizon  | Singapore, SG        | 759 Mbits/sec   | 43.2 Mbits/sec  | 100 ms   |
+-------------------------------------------------------------------------------------------+
Geekbench 5 run failed, please retry again

By 行政