Difference between revisions of "Internet Offline: UnixBench"

From OnnoWiki
Jump to: navigation, search
(Script unixbench-run.sh)
(Run)
 
(8 intermediate revisions by the same user not shown)
Line 16: Line 16:
  
 
  cd /usr/local/src/byte-unixbench-master/UnixBench
 
  cd /usr/local/src/byte-unixbench-master/UnixBench
  ./Run > hasil.txt
+
rm hasil.txt
 
+
  ./Run > hasil.txt &
  
 
==Run ssh & Script==
 
==Run ssh & Script==
Line 27: Line 27:
 
  vi unixbench-run.sh
 
  vi unixbench-run.sh
  
 +
rm -Rf /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
 +
touch /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
 
  cd /usr/local/src/byte-unixbench-master/UnixBench/
 
  cd /usr/local/src/byte-unixbench-master/UnixBench/
  rm /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
+
  ./Run >> hasil-unixbench.txt
  touch /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
+
  /bin/chmod -Rf 777 hasil-unixbench.txt
  /usr/local/src/byte-unixbench-master/UnixBench/Run >> /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
+
  mv hasil-unixbench.txt /home/onno/hasil-unixbench-1CORE-1024M.txt
  chmod -Rf 777 /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
+
  shutdown -h now &
 +
exit
  
Setelah di save
+
Save & chmod
  
 
  chmod 777 unixbench-run.sh
 
  chmod 777 unixbench-run.sh
Line 40: Line 43:
  
 
  ssh -t user@remote 'sudo /home/user/unixbench-run.sh'
 
  ssh -t user@remote 'sudo /home/user/unixbench-run.sh'
sleep 75m
 
ssh -t user@remote 'sudo mv /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt hasil-unixbench-1.txt'
 
  
 
==Run untuk VirtualBox==
 
==Run untuk VirtualBox==
Line 47: Line 48:
 
===ub-vmall.sh===
 
===ub-vmall.sh===
  
  cd /home/onno
+
  VBoxManage controlvm "Offline" acpipowerbutton
  /home/onno/ub-vm1-0.sh
+
  sleep 60
  /home/onno/ub-vm1-1.sh
+
VBoxManage modifyvm "Offline" --memory 512
  /home/onno/ub-vm1-2.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 3
  /home/onno/ub-vm1-4.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 2
  /home/onno/ub-vm2-0.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 1
/home/onno/ub-vm2-1.sh
+
  VBoxManage startvm "Offline"
  /home/onno/ub-vm2-2.sh
+
sleep 110
  /home/onno/ub-vm2-4.sh
+
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-512M.sh'
  /home/onno/ub-vm3-0.sh
+
   
  /home/onno/ub-vm3-1.sh
+
  VBoxManage controlvm "Offline" acpipowerbutton
  /home/onno/ub-vm3-2.sh
+
sleep 60
  /home/onno/ub-vm3-4.sh
+
  VBoxManage modifyvm "Offline" --memory 1024
  /home/onno/ub-vm4-0.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 3
  /home/onno/ub-vm4-1.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 2
  /home/onno/ub-vm4-2.sh
+
  VBoxManage modifyvm "Offline" --unplugcpu 1
/home/onno/ub-vm4-4.sh
+
  VBoxManage startvm "Offline"
 +
  sleep 110
 +
  ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-1024M.sh'
  
 +
VBoxManage controlvm "Offline" acpipowerbutton
 +
sleep 60
 +
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
 +
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-2048M.sh'
 +
 +
VBoxManage controlvm "Offline" acpipowerbutton
 +
sleep 60
 +
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
 +
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-4096M.sh'
 +
 +
VBoxManage controlvm "Offline" acpipowerbutton
 +
sleep 60
 +
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
 +
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-2CORE-512M.sh'
  
===Contoh ub-vm1-0.sh===
+
..
 +
..
 +
..
 +
VBoxManage controlvm "Offline" acpipowerbutton
 +
sleep 60
 +
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
 +
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-4CORE-4096M.sh'
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 
* [[Internet Offline]]
 
* [[Internet Offline]]

Latest revision as of 14:39, 19 May 2019

Install

apt update
apt install mesa-common-dev libsdl-net1.2-dev libsdl-net1.2 unzip  # untuk RaspberryPi
apt install mesa-common-dev libsdl* unzip                          # untuk PC

Compile

cd /usr/local/src
wget https://github.com/kdlucas/byte-unixbench/archive/master.zip
unzip master.zip
cd /usr/local/src/byte-unixbench-master/UnixBench
make

Run

cd /usr/local/src/byte-unixbench-master/UnixBench
rm hasil.txt
./Run > hasil.txt &

Run ssh & Script

Pastikan id_dsa.pub & id_rsa.pub sudah di copy ke .ssh/known_hosts

Script unixbench-run.sh

vi unixbench-run.sh
rm -Rf /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
touch /usr/local/src/byte-unixbench-master/UnixBench/hasil-unixbench.txt
cd /usr/local/src/byte-unixbench-master/UnixBench/
./Run >> hasil-unixbench.txt
/bin/chmod -Rf 777 hasil-unixbench.txt
mv hasil-unixbench.txt /home/onno/hasil-unixbench-1CORE-1024M.txt
shutdown -h now &
exit

Save & chmod

chmod 777 unixbench-run.sh

Execute dari remote

ssh -t user@remote 'sudo /home/user/unixbench-run.sh'

Run untuk VirtualBox

ub-vmall.sh

VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-512M.sh'

VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-1024M.sh'
VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-2048M.sh'

VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-1CORE-4096M.sh'

VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-2CORE-512M.sh'
..
..
..
VBoxManage controlvm "Offline" acpipowerbutton
sleep 60
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
ssh onno@192.168.0.3 'echo 123456 | sudo -S /home/onno/unixbench-4CORE-4096M.sh'

Pranala Menarik