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.
 

39 lines
1014 B

#!/bin/bash
if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ];then
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash
apt-get install -y sysbench
fi
echo "" > sysbench.log
{
echo "#################################"
echo "CPU Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
sysbench cpu --cpu-max-prime=20000 run >> sysbench.log
{
echo ""
echo "#################################"
echo "RAM Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
sysbench memory --memory-block-size=1K --memory-total-size=100G run >> sysbench.log
{
echo ""
echo "#################################"
echo "Disk Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
sysbench fileio --file-total-size=5G prepare &>/dev/null
sysbench fileio --file-total-size=5G --file-test-mode=rndrw --time=300 --max-requests=0 run >> sysbench.log
sysbench fileio --file-total-size=5G cleanup &>/dev/null