Dbench: Internet Offline - Rpi 10-100 concurrent
Mount
Mount RaspberryPi
mkdir -p /mnt/public umount /mnt/public/ mount.cifs //192.168.0.1/public /mnt/public -o username=pi,password=raspberry mount -t cifs //192.168.0.1/public /mnt/public -o username=pi,password=raspberry # cara lain
Mount ASUS
mkdir -p /mnt/public umount /mnt/public/ mount.cifs //192.168.0.2/public /mnt/public -o username=onno,password=123456 mount -t cifs //192.168.0.2/public /mnt/public -o username=onno,password=123456 # cara lain
Mount VM
mkdir -p /mnt/public umount /mnt/public/ mount.cifs //192.168.0.3/public /mnt/public -o username=onno,password=123456 mount -t cifs //192.168.0.3/public /mnt/public -o username=onno,password=123456 # cara lain
dbenchscript-10-100.sh
sudo -u onno rm hasiltest.txt sudo -u onno touch hasiltest.txt sudo -u onno echo 10 > hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 10 >> hasiltest.txt" sleep 15m sudo -u onno echo 20 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 20 >> hasiltest.txt" sleep 15m sudo -u onno echo 30 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 30 >> hasiltest.txt" sleep 15m sudo -u onno echo 40 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 40 >> hasiltest.txt" sleep 15m sudo -u onno echo 50 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 50 >> hasiltest.txt" sleep 15m sudo -u onno echo 60 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 60 >> hasiltest.txt" sleep 15m sudo -u onno echo 70 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 70 >> hasiltest.txt" sleep 15m sudo -u onno echo 80 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 80 >> hasiltest.txt" sleep 15m sudo -u onno echo 90 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 90 >> hasiltest.txt" sleep 15m sudo -u onno echo 100 >> hasiltest.txt exec sudo su -c "dbench --directory=/mnt/public/ --loadfile=/usr/share/dbench/client.txt --skip-cleanup 100 >> hasiltest.txt"
Script Evaluasi VM
Caller VM Main
cd /home/onno /home/onno/dbench-vm1-0.sh /home/onno/dbench-vm1-1.sh /home/onno/dbench-vm1-2.sh /home/onno/dbench-vm1-4.sh /home/onno/dbench-vm2-0.sh /home/onno/dbench-vm2-1.sh /home/onno/dbench-vm2-2.sh /home/onno/dbench-vm2-4.sh /home/onno/dbench-vm3-0.sh /home/onno/dbench-vm3-1.sh /home/onno/dbench-vm3-2.sh /home/onno/dbench-vm3-4.sh /home/onno/dbench-vm4-0.sh /home/onno/dbench-vm4-1.sh /home/onno/dbench-vm4-2.sh /home/onno/dbench-vm4-4.sh
Contoh dbench-vm1-0.sh
sudo -u onno rm -Rf hasiltest.txt touch hasiltest.txt VBoxManage controlvm "Offline" acpipowerbutton sleep 30 VBoxManage modifyvm "Offline" --memory 512 VBoxManage modifyvm "Offline" --unplugcpu 3 VBoxManage modifyvm "Offline" --unplugcpu 2 VBoxManage modifyvm "Offline" --unplugcpu 1 VBoxManage startvm "Offline" sleep 100 /home/onno/dbenchscript-10-100.sh exec sudo su -c "mv hasiltest.txt hasiltest-192.168.0.3-1CORE-512M.txt" exec sudo su -c "rm -Rf /mnt/public/*"
Contoh dbench-vm4-4.sh
sudo -u onno rm -Rf hasiltest.txt touch hasiltest.txt VBoxManage controlvm "Offline" acpipowerbutton sleep 30 VBoxManage modifyvm "Offline" --memory 4096 VBoxManage modifyvm "Offline" --plugcpu 3 VBoxManage modifyvm "Offline" --plugcpu 2 VBoxManage modifyvm "Offline" --plugcpu 1 VBoxManage startvm "Offline" sleep 100 /home/onno/dbenchscript-10-100.sh exec sudo su -c "mv hasiltest.txt hasiltest-192.168.0.3-4CORE-4096M.txt" exec sudo su -c "rm -Rf /mnt/public/*"
Melihat hasil
grep Throughput hasiltest.txt