cpu-spike 310 B

123456789101112131415
  1. #!/bin/bash
  2. fulload(){
  3. echo "Starting fork $1";
  4. dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null &
  5. };
  6. start=1;
  7. if [ "$1" != "" ];then
  8. for (( i=$start;i<=$1;i++ )); do
  9. fulload $i;
  10. done;
  11. else
  12. fulload 1;
  13. fi;
  14. read;
  15. killall dd;