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

Feel free to fork.

you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 3 days ago (5 children)

For research purposes, any way to parallelize across all cores?

  • source
  • hideshow 5 child comments
  • [–] 3 points 3 days ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 2 points 3 days ago (2 children)

    Good question. I only know of the nice command, which only manipulates affinity and priority. I wonder how to target multiple cores from the CLI.

  • source
  • parent
  • hideshow 2 child comments