Advertisement
Guest User

overload.sh

a guest
Jan 15th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. #!/bin/bash
  2. #Simple stress test for system. If it survives this, it's probably stable.
  3. #Free software, GPL2+
  4.  
  5. echo "Testing overclock stability..."
  6.  
  7. #Max out all CPU cores. Heats it up, loads the power-supply.
  8. for ((i=0; i<$(nproc --all); i++)); do nice yes >/dev/null & done
  9.  
  10. #Read the entire SD card 10x. Tests RAM and I/O
  11. for i in `seq 1 10`; do echo reading: $i; sudo dd if=/dev/mmcblk0 of=/dev/null bs=4M; done
  12.  
  13. #Writes 512 MB test file, 10x.
  14. for i in `seq 1 10`; do echo writing: $i; dd if=/dev/zero of=deleteme.dat bs=1M count=512; sync; done
  15.  
  16. #Clean up
  17. killall yes
  18. rm deleteme.dat
  19.  
  20. #Print summary. Anything nasty will appear in dmesg.
  21. echo -n "CPU freq: " ; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
  22. echo -n "CPU temp: " ; cat /sys/class/thermal/thermal_zone0/temp
  23. dmesg | tail
  24.  
  25. echo "Not crashed yet, probably stable."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement