You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

26 lines
510 B

#!/bin/bash
# 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
wget -qO bench.sh https://raw.githubusercontent.com/hidden-refuge/bench-sh-2/master/bench.sh
chmod +x bench.sh
./bench.sh
apt-get install sysbench -y &>/dev/null
sysbench --test=cpu --cpu-max-prime=20000 run
# We're done !
echo ""
echo -e " ${CGREEN}Benchmark successful !${CEND}"
echo ""