hostzg.com
科技智变,云启未来!

Linux系统 VPS/云服务器 测评跑分脚本/UnixBench一键跑分脚本

UnixBench是一款开源的用于测试Unix、BSD、Linux系统基本性能的工具,比较通用于Linux系统VPS性能测试,主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。使用非常简单,下面简单的几段命令即可实现一键跑分测试。

一、脚本命令

如果你想使用UnixBench测试你的服务器性能,请使用SSH工具连接你的服务器后执行下面命令。脚本默认使用UnixBench5.1.3版本,因为大多VPS都没有显卡或者是集成显卡,不需要进行图像性能测试,所以作者注释了关于graphic的测试项。此脚本运行测试时间大约10-30分钟,跑分结束后得分越高性能越好。

wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh

备用命令:

wget --no-check-certificate https://github.com/wn789/unixbench/blob/master/unixbench.sh
chmod +x unixbench.sh
./unixbench.sh

二、测试效果

------------------------------------------------------------------------
Benchmark Run: Wed Dec 19 2018 19:50:58 - 20:19:17
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       21092505.4 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2655.9 MWIPS (9.9 s, 7 samples)
Execl Throughput                                845.3 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        213526.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           55094.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        669049.2 KBps  (30.0 s, 2 samples)
Pipe Throughput                              262532.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  32340.5 lps   (10.0 s, 7 samples)
Process Creation                               1722.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2072.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    384.7 lpm   (60.0 s, 2 samples)
System Call Overhead                         308320.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   21092505.4   1807.4
Double-Precision Whetstone                       55.0       2655.9    482.9
Execl Throughput                                 43.0        845.3    196.6
File Copy 1024 bufsize 2000 maxblocks          3960.0     213526.5    539.2
File Copy 256 bufsize 500 maxblocks            1655.0      55094.0    332.9
File Copy 4096 bufsize 8000 maxblocks          5800.0     669049.2   1153.5
Pipe Throughput                               12440.0     262532.9    211.0
Pipe-based Context Switching                   4000.0      32340.5     80.9
Process Creation                                126.0       1722.2    136.7
Shell Scripts (1 concurrent)                     42.4       2072.5    488.8
Shell Scripts (8 concurrent)                      6.0        384.7    641.1
System Call Overhead                          15000.0     308320.4    205.5
                                                                   ========
System Benchmarks Index Score                                         363.6

------------------------------------------------------------------------
Benchmark Run: Wed Dec 19 2018 20:19:17 - 20:47:45
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       40199084.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     5315.7 MWIPS (9.9 s, 7 samples)
Execl Throughput                               1321.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        329910.4 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           89161.7 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1131551.0 KBps  (30.0 s, 2 samples)
Pipe Throughput                              496906.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  89894.4 lps   (10.0 s, 7 samples)
Process Creation                               3208.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2742.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    380.8 lpm   (60.2 s, 2 samples)
System Call Overhead                         562093.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   40199084.3   3444.7
Double-Precision Whetstone                       55.0       5315.7    966.5
Execl Throughput                                 43.0       1321.4    307.3
File Copy 1024 bufsize 2000 maxblocks          3960.0     329910.4    833.1
File Copy 256 bufsize 500 maxblocks            1655.0      89161.7    538.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    1131551.0   1951.0
Pipe Throughput                               12440.0     496906.4    399.4
Pipe-based Context Switching                   4000.0      89894.4    224.7
Process Creation                                126.0       3208.2    254.6
Shell Scripts (1 concurrent)                     42.4       2742.8    646.9
Shell Scripts (8 concurrent)                      6.0        380.8    634.7
System Call Overhead                          15000.0     562093.4    374.7
                                                                   ========
System Benchmarks Index Score                                         618.8
------------------------------------------------------------------------

三,UnixBench常见问题

UnixBench常见问题1:

错误提示:如果在运行MAKE的时候出现如下错误:

make: gcc: Command not found
make: *** [pgms/arithoh] Error 127

解决方案:用下面的命令安装gcc,( 如果是是debian系统,则把下面命令中的yum变为apt-get。)安装完成后执行make命令。

yum install gcc

UnixBench常见问题2:

错误提示:出现”bash: make: command not found”问题

解决方案:运行下面的命令,然后运行make命令安装,再次运行./run进行跑分。

yum -y install gcc automake autoconf libtool make

UnixBench常见问题3:

错误提示:如果出现 Error: Please install /usr/bin/time 错误

解决方案:运行下面的命令, 如果是是debian系统,则把下面命令中的yum变为apt-get。然后运行make命令安装,再次运行./run进行跑分。

yum install time

UnixBench常见问题4:

错误提示:如果运行./Run时出现 Can’t locate Time/HiRes.pm 开头的错误提示

解决方案:运行下面的命令安装组件,如果是是debian系统,则把下面命令中的yum变为apt-get,安装完成后再次云行./run进行跑分。

yum install perl-Time-HiRes

UnixBench常见问题5:

错误提示:运行wget https://raw.githubusercontent.com/yunqikan/UnixBench/master/UnixBench-5.1.3.tar.gz命令时出现错误提示:Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.228.133|:443… failed: Connection refused. 此提示表明连接被拒绝。

解决方案:运行下面的命令安装gcc语言编译器,再次运行wget https://raw.githubusercontent.com/yunqikan/UnixBench/master/UnixBench-5.1.3.tar.gz命令。

yum -y install gcc gcc-c autoconf gcc-c++ time

赞(1) 打赏
未经允许不得转载:HOSTZG » Linux系统 VPS/云服务器 测评跑分脚本/UnixBench一键跑分脚本

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏