Ubuntu系统使用UnixBench对CPU进行测试跑分一键脚本

简介

Unixbench是一个类unix系(Unix,BSD,Linux)统下的性能测试工具,一个开源工具,被广泛用与测试linux系统主机的性能,简称UB。Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。

UnixBench 一键安装

下载一键安装脚本

wget http://teddysun.com/wp-content/uploads/unixbench.sh

为脚本添加执行权限

chmod +x unixbench.sh

运行脚本会先检查依赖,会自动完成安装,然后开始对CPU进行测试,这里需要 ROOT 权限

sudo bash ./unixbench.sh

结果

测试开始后,软件会自动进行各项测试,并为其评分,测试完成后,将会输出一个测试报表

测试分为:CPU详情,CPU单核测试评分,CPU整体测试评分

例:以下测试结果配置为:i9 9900K 64G DDR4 1T SSD

CPU详情:

===============================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: eshb32561ds: GNU/Linux
   OS: GNU/Linux -- 4.14.129-bbrplus -- #1 SMP Mon Jun 24 16:51:05 UTC 2019
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 2: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 3: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 4: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 5: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 6: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 7: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 8: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 9: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 10: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 11: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 12: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 13: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 14: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 15: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (7200.0 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   13:09:47 up 23:38,  2 users,  load average: 0.46, 0.42, 0.38; runlevel 5

===============================================================================

CPU单核性能:

===============================================================================
Benchmark Run: Mon Oct 14 2019 13:09:47 - 13:42:13
16 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       56582224.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3765.6 MWIPS (17.7 s, 7 samples)
Execl Throughput                               9163.8 lps   (29.4 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1699764.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          454269.4 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3911540.1 KBps  (30.0 s, 2 samples)
Pipe Throughput                             3196608.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 238865.7 lps   (10.0 s, 7 samples)
Process Creation                              16162.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  15061.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   5818.9 lpm   (60.0 s, 2 samples)
System Call Overhead                        4420334.3 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   56582224.1   4848.5
Double-Precision Whetstone                       55.0       3765.6    684.7
Execl Throughput                                 43.0       9163.8   2131.1
File Copy 1024 bufsize 2000 maxblocks          3960.0    1699764.2   4292.3
File Copy 256 bufsize 500 maxblocks            1655.0     454269.4   2744.8
File Copy 4096 bufsize 8000 maxblocks          5800.0    3911540.1   6744.0
Pipe Throughput                               12440.0    3196608.6   2569.6
Pipe-based Context Switching                   4000.0     238865.7    597.2
Process Creation                                126.0      16162.6   1282.7
Shell Scripts (1 concurrent)                     42.4      15061.3   3552.2
Shell Scripts (8 concurrent)                      6.0       5818.9   9698.1
System Call Overhead                          15000.0    4420334.3   2946.9
                                                                   ========
System Benchmarks Index Score                                        2635.6

===============================================================================

CPU整体性能:

===============================================================================
Benchmark Run: Mon Oct 14 2019 13:42:13 - 14:12:05
16 CPUs in system; running 16 parallel copies of tests

Dhrystone 2 using register variables      508633950.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    50195.6 MWIPS (17.3 s, 7 samples)
Execl Throughput                              57716.7 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1461317.5 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          378899.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       4532485.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                            27958801.1 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                3581882.5 lps   (10.0 s, 7 samples)
Process Creation                              89496.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  76855.5 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                  12103.7 lpm   (60.0 s, 2 samples)
System Call Overhead                       11023527.7 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  508633950.5  43584.7
Double-Precision Whetstone                       55.0      50195.6   9126.5
Execl Throughput                                 43.0      57716.7  13422.5
File Copy 1024 bufsize 2000 maxblocks          3960.0    1461317.5   3690.2
File Copy 256 bufsize 500 maxblocks            1655.0     378899.0   2289.4
File Copy 4096 bufsize 8000 maxblocks          5800.0    4532485.3   7814.6
Pipe Throughput                               12440.0   27958801.1  22474.9
Pipe-based Context Switching                   4000.0    3581882.5   8954.7
Process Creation                                126.0      89496.8   7102.9
Shell Scripts (1 concurrent)                     42.4      76855.5  18126.3
Shell Scripts (8 concurrent)                      6.0      12103.7  20172.9
System Call Overhead                          15000.0   11023527.7   7349.0
                                                                   ========
System Benchmarks Index Score                                       10255.8

===============================================================================

相关推荐: #小飞机#libev版一键脚本

介绍系统支持:Debian/Ubuntu/CentOS内存要求:≥128M特性该版本的特点是内存占用小,大概600k左右,使用libev和C编写,低CPU消耗,甚至可以安装在基于OpenWRT的路由器上;安装Debian/Ubuntuwget –no-che…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发

请登录后发表评论