dd if=/dev/urandom of=/dev/null  

Feel free to fork.

    • palordrolap@fedia.io
      link
      fedilink
      arrow-up
      5
      ·
      2 days ago

      for((i=0;i<$(grep -c '^processor' /proc/cpuinfo);i++)); do dd if=/dev/urandom of=/dev/null & done

      killall dd if you want to kill them

      Caveats: Runs on my machine. Might not work on yours. If it does, you accept all responsibility for any system damage from running it or any version with typos.

      Other notes: This doesn’t actually lock each process to a specific processor, but the system ought to spread the load anyway. taskset --cpu-list $i before the dd if you absolutely have to have that.