Browse Source

Update sysbench

master
VirtuBox 2 months ago
parent
commit
8b40702ac4
Signed by: virtubox GPG Key ID: 22EB296C97BAD476
1 changed files with 14 additions and 32 deletions
  1. +14
    -32
      sysbench.sh

+ 14
- 32
sysbench.sh View File

@ -1,54 +1,36 @@
#!/bin/bash
if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ];then
echo "#################################"
echo "installing sysbench"
echo "#################################"
wget -qO sysbench-install.sh https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh
chmod +x sysbench-install.sh
./sysbench-install.sh > /dev/null 2>&1
apt-get install -y sysbench
if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ]; then
echo "#################################"
echo "installing sysbench"
echo "#################################"
{
curl -sL https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash
apt update && apt install -y sysbench
} >/dev/null 2>&1
fi
echo "" > sysbench.log
echo "" >sysbench.log
{
echo "#################################"
echo "CPU Benchmark"
echo "#################################"
echo "CPU Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
echo "starting CPU Benchmark"
sysbench cpu --cpu-max-prime=20000 run >> sysbench.log
sysbench cpu --cpu-max-prime=20000 run
echo "CPU Benchmark : [OK]"
{
echo ""
echo "#################################"
echo "RAM Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
echo "starting RAM Benchmark"
sysbench memory --memory-block-size=1K --memory-total-size=100G run >> sysbench.log
echo "RAM Benchmark : [OK]"
{
echo ""
echo "#################################"
echo "Disk Benchmark"
echo "Disk Benchmark"
echo "#################################"
echo ""
} >> sysbench.log
echo "starting Disk Benchmark"
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 --file-test-mode=rndrw --time=300 --max-requests=0 run >>sysbench.log
sysbench fileio --file-total-size=5G cleanup &>/dev/null
echo "Disk Benchmark : [OK]"

Loading…
Cancel
Save