Internet Offline: Mengukur kiwix X86

From OnnoWiki
Jump to: navigation, search

Server

kiwix-on.sh

echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve
cd /usr/local/src/kiwix-0.10-x86_84/bin/
/usr/local/src/kiwix-0.10-x86_84/bin/kiwix-serve --port=8080 /usr/local/src/kiwix-0.10-x86_84/bin/wikipedia_id_all_novid_2018-07.zim &
/usr/local/src/kiwix-0.10-x86_84/bin/kiwix-serve --port=8081 /usr/local/src/kiwix-0.10-x86_84/bin/wiktionary_id_all_novid_2018-07.zim &


kiwix-off.sh

echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve
echo 123456 | sudo -S killall kiwix-serve


Install Siege

sudo su
apt update
apt -y install siege

URL kiwix

vi ~/.siege/url-192.168.0.1.txt
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/
http://192.168.0.1:8080/search?content=wikipedia_id_all_novid_2018-07&pattern=Onno+W.+Purbo
http://192.168.0.1:8080/skin/jquery-ui/jquery-ui.min.js
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Onno_W._Purbo.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Daerah_Khusus_Ibukota_Jakarta.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Lambang_Daerah_Khusus_Ibukota_Jakarta.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Kiwix.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Perangkat_lunak_bebas.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Richard_Stallman.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Indonesia.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Matematika.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Ilmu_fisik.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Reaksi_asam_basa.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Asam.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Biologi.html
http://192.168.0.1:8080/wikipedia_id_all_novid_2018-07/A/Organisme.html
http://192.168.0.1:8081/wiktionary_id_all_novid_2018-07/
http://192.168.0.1:8081/wiktionary_id_all_novid_2018-07/A/bahasa_Indonesia.html
http://192.168.0.1:8081/wiktionary_id_all_novid_2018-07/A%2fki%c3%aan%2dkap%2dkut%2ehtml

Client Test

Script kiwixtest.sh

ssh pi@192.168.0.1 /home/pi/kiwix-on.sh &
sleep 5
rm -Rf hasil-kiwix-192.168.0.1.txt
touch hasil-kiwix-192.168.0.1.txt
echo 10 &> hasil-kiwix-192.168.0.1.txt
siege -c 10 -t1m -i -f /home/onno/.siege/url-192.168.0.1.txt &> hasil-kiwix-192.168.0.1.txt
echo 20 &> hasil-kiwix-192.168.0.1.txt
siege -c 20 -t1m -i -f /home/onno/.siege/url-192.168.0.1.txt &> hasil-kiwix-192.168.0.1.txt
echo 30 &> hasil-kiwix-192.168.0.1.txt
siege -c 30 -t1m -i -f /home/onno/.siege/url-192.168.0.1.txt &> hasil-kiwix-192.168.0.1.txt
echo 40 &> hasil-kiwix-192.168.0.1.txt
siege -c 40 -t1m -i -f /home/onno/.siege/url-192.168.0.1.txt &> hasil-kiwix-192.168.0.1.txt
echo 50 &> hasil-kiwix-192.168.0.1.txt
siege -c 50 -t1m -i -f /home/onno/.siege/url-192.168.0.1.txt &> hasil-kiwix-192.168.0.1.txt
ssh pi@192.168.0.1 /home/pi/kiwix-off.sh &
ssh onno@192.168.0.2 /home/onno/kiwix-on.sh &
sleep 5
rm -Rf hasil-kiwix-192.168.0.2.txt
touch hasil-kiwix-192.168.0.2.txt
echo 10 &> hasil-kiwix-192.168.0.2.txt
siege -c 10 -t1m -i -f /home/onno/.siege/url-192.168.0.2.txt &> hasil-kiwix-192.168.0.2.txt
echo 20 &> hasil-kiwix-192.168.0.1.txt
siege -c 20 -t1m -i -f /home/onno/.siege/url-192.168.0.2.txt &> hasil-kiwix-192.168.0.2.txt
echo 30 &> hasil-kiwix-192.168.0.1.txt
siege -c 30 -t1m -i -f /home/onno/.siege/url-192.168.0.2.txt &> hasil-kiwix-192.168.0.2.txt
echo 40 &> hasil-kiwix-192.168.0.1.txt
siege -c 40 -t1m -i -f /home/onno/.siege/url-192.168.0.2.txt &> hasil-kiwix-192.168.0.2.txt
echo 50 &> hasil-kiwix-192.168.0.1.txt
siege -c 50 -t1m -i -f /home/onno/.siege/url-192.168.0.2.txt &> hasil-kiwix-192.168.0.2.txt
ssh onno@192.168.0.2 /home/pi/kiwix-off.sh &
ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
sleep 5
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
rm -Rf hasil-kiwix-192.168.0.3.txt
touch hasil-kiwix-192.168.0.3.txt
echo 10 &> hasil-kiwix-192.168.0.3.txt
siege -c 10 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 20 &> hasil-kiwix-192.168.0.1.txt
siege -c 20 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 30 &> hasil-kiwix-192.168.0.1.txt
siege -c 30 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 40 &> hasil-kiwix-192.168.0.1.txt
siege -c 40 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 50 &> hasil-kiwix-192.168.0.1.txt
siege -c 50 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 100 &> hasil-kiwix-192.168.0.1.txt
siege -c 100 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
echo 150 &> hasil-kiwix-192.168.0.1.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

Script kiwix-vmall.sh

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
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 110
touch hasil-kiwix-192.168.0.3-1CORE-512M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-512M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-1024M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-1024M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 2048
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-2048M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-2048M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 4096
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-4096M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-4096M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &


ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
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 110
touch hasil-kiwix-192.168.0.3-1CORE-512M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-512M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-1024M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-1024M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 2048
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-2048M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-2048M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 4096
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --unplugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-1CORE-4096M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-1CORE-4096M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 512
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-2CORE-512M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-2CORE-512M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-2CORE-1024M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-2CORE-1024M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 2048
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-2CORE-2048M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-2CORE-2048M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 4096
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --unplugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-2CORE-4096M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-2CORE-4096M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 512
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-3CORE-512M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-3CORE-512M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-3CORE-1024M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-3CORE-1024M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 2048
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-3CORE-2048M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-3CORE-2048M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 4096
VBoxManage modifyvm "Offline" --unplugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-3CORE-4096M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-3CORE-4096M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 512
VBoxManage modifyvm "Offline" --plugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-4CORE-512M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-4CORE-512M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 1024
VBoxManage modifyvm "Offline" --plugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-4CORE-1024M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-4CORE-1024M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
VBoxManage controlvm "Offline" acpipowerbutton
sleep 30
VBoxManage modifyvm "Offline" --memory 2048
VBoxManage modifyvm "Offline" --plugcpu 3
VBoxManage modifyvm "Offline" --plugcpu 2
VBoxManage modifyvm "Offline" --plugcpu 1
VBoxManage startvm "Offline"
sleep 110
touch hasil-kiwix-192.168.0.3-4CORE-2048M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-4CORE-2048M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

ssh onno@192.168.0.3 /home/onno/kiwix-on.sh &
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 110
touch hasil-kiwix-192.168.0.3-4CORE-4096M.txt
siege -c 150 -t1m -i -f /home/onno/.siege/url-192.168.0.3.txt &> hasil-kiwix-192.168.0.3-4CORE-4096M.txt
ssh onno@192.168.0.3 /home/pi/kiwix-off.sh &

Pranala Menarik