vps-benchmark/debian.sh

26 lines
510 B
Bash
Raw Normal View History

2017-01-14 19:04:46 +01:00
#!/bin/bash
2017-01-14 19:28:46 +01:00
# Colors
CSI="\033["
CEND="${CSI}0m"
CRED="${CSI}1;31m"
CGREEN="${CSI}1;32m"
# Check root access
if [[ "$EUID" -ne 0 ]]; then
echo -e "${CRED}Sorry, you need to run this as root${CEND}"
exit 1
fi
2017-01-14 19:04:46 +01:00
wget -qO bench.sh https://raw.githubusercontent.com/hidden-refuge/bench-sh-2/master/bench.sh
2017-01-14 19:06:24 +01:00
chmod +x bench.sh
2017-01-14 19:40:29 +01:00
./bench.sh
apt-get install sysbench -y &>/dev/null
sysbench --test=cpu --cpu-max-prime=20000 run
2017-01-14 19:28:46 +01:00
# We're done !
echo ""
echo -e " ${CGREEN}Benchmark successful !${CEND}"
echo ""