One of the really interesting ways of stress testing CPUs on your system is using dd command. By making it work with /dev/zero and /dev/null (which are not real devices in terms of disk I/O), you’re effectively getting dd to shift a whole lot of zero bytes between addresses in virtual memory – thus causing CPU (and possibly a bit of RAM) stress.
Screenshot above shows how a stressed system looks – all CPU cores are 100% busy.
How To Stress CPU with dd command
My example refers to /proc/cpuinfo file, which is Linux specific. We confirm the number of CPU cores available on the system and then start a number of dd processes in background:
How To Check CPU status with htop
If you don’t have the htop command on your Linux system yet, you can easily install it. On my Dell XPS 13 laptop with Linux Mint it means this:
After we run htop:
… we get the output just like the one shown at the top of this post:
htop showing CPU busy with dd
Once stress testing is done, we need to kill all the dd processes: