性能测试:UnixBench一键脚本
UnixBench是一个类unix系(Unix,BSD,Linux)统下的性能测试工具,一个开源工具,被广泛用与测试linux系统主机的性能。Unixbench的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。
最新版本UnixBench5.1.3,包含system和graphic测试,如果你需要测试graphic,则需要修改Makefile,不要注释掉”GRAPHIC_TESTS = defined”,同时需要系统提供x11perf命令gl_glibs库。
下面的脚本使用了最新版UnixBench5.1.3来测试,注释了关于graphic的测试项(大多数VPS都是没有显卡或者是集显,所以图像性能无需测试),运行10-30分钟后(根据CPU内核数量,运算时间不等)得出分数,越高越好。
使用方法:
wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh chmod +x unixbench.sh ./unixbench.sh
网速和硬盘IO测试:bench.sh
安装使用方法:
命令1: wget -qO- bench.sh | bash 或者 curl -Lso- bench.sh | bash 命令2: wget -qO- 86.re/bench.sh | bash 或者 curl -so- 86.re/bench.sh | bash
speedtest
这玩意是啥我就不解释了
安装和使用:
wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py chmod a+rx speedtest.py mv speedtest.py /usr/local/bin/speedtest chown root:root /usr/local/bin/speedtest
这样的话测试的是本地,基本上端口到底是多少用这个就可以差不多知道了。
如果你要想测到国内或者说到你本地是多少速度的话使用下面的方法:
speedtest --list | grep XXXX #查看某地测速点列表 speedtest --list | grep Chengdu #比如我查看成都测速点
前面的数字就是测速点的代号,然后使用类似下面的命令:
speedtest --server=XXXX #指定测速点测速 speedtest --server=4624 #成都电信测速点
可以看到上传有点蛋疼。。不过也差不多够了,反正YouTube的1080P60帧没问题。