If you’re a power user, then having the ability to put your CPU under a bit of stress can be quite useful. For instance, let’s say that you’ve just over clocked (running it in higher speeds than recommended, yikes!) the CPU and wanted to know if your fan or the cooling system in general could handle the new speeds (= generating more heat etc).
Now under MS Windows you can find a lot of tools, however, in GNU/Linux or Ubuntu (as in this case) there aren’t that many you can use (or at least as far as I know). But, if you’re looking for a CPU stress testing utility that’s optimized for both Intel and AMD micro processors, then the utility know as “cpuburn” will come in handy.
But please remember that, putting a lot of stress (100% of CPU usage) on your CPU (especially if you’ve over clocked it) can easily damage your hardware. So with all due respect, dear readers, if you don’t know what you’re doing, please don’t use it!. And also note that, this is not a CPU benchmark tool, but only a stress tester.
(in the picture: I’ve used 4 terminals as I have a CPU with 4-cores, and CPU usage was measured using the awesome “Glances” system monitor).
*. Although it’s named “cpuburn” but in truth, it comes with few individual utilities (6 small ones) that as said are optimized for Intel and AMD CPU designs, which you can use, depending on your CPU model.
For Intel …
“burnP5”, “burnP6” (better than the “P5” as it supports never CPU models), “burnMMX” (also supports AMD) and “burnBX” (a CPU cache memory related test).
For AMD …
“burnK6”, “burnK7” and “burnMMX”.
*. But of course you can use the AMD optimized packages in Intel chips and Intel ones in AMD etc.
Just to make sure, I tested the AMD optimized tools with my Intel Core i3-2330 (4-cores running an 2.2GHZ. Well actually, it only has 2 cores that can deal with 4 threads simultaneously, which makes it looks like a 4-core processor in a system monitoring tool) and they did put it under full stress (100% usage).
However, since I’m not an expert on that field, I should humbly suggest only to use the tests that are optimized for your CPU type for better results.
Well, that’s it for the features.
You can install “cpuburn” in Ubuntu 12.04 Precise Pangolin, 11.10 Oneiric Ocelot, 11.04 Natty Narwhal, 10.10 and 10.04 by using the below command in your Terminal window.
sudo apt-get install cpuburn
How to use it?
Quite simple actually. Depending on your CPU type (Intel or AMD) choose one of the individual commands as shown above and put it in your Terminal window and press Enter!.
An example …
As said above, I have an Intel Core i3-2330 (4-cores) CPU and to put it under stress, I’d prefer to use the “burnP6” package (as it’s optimized for never Intel CPU from the bunch).
So for that, I’d simply enter its command in my Terminal window as shown below.
If you have multi-cores …
This however, will only stress a single core, but to to put the whole CPU (all 4 cores) under full stress (oh come on dudes, have mercy! :P) I’ll have to open 4 terminals/tabs and enter “burnP6” under each Terminal window. So altogether, 4 “burnP6” programs will be running simultaneously. That’s it!.
You can terminate (exit) the CPU stress utility/utilities whenever you want by pressing “Ctrl” + “c” keys. Again, if you run multiple Terminals, you’ll have to terminate each one individually.
Update: As ‘Roy’ pointed out (in the comments) it is a bit lame to open tabs or new windows in Terminal for running multiple instances. So if you want a shortcut then you can use this other method for achieving the same task.
Another method: Simply copy and paste the below command into your Terminal window (make sure to replace ‘burnP6’ accordingly).
As soon as you enter this, you’ll be automatically brought back to the ‘$’ (prompt) because of the ‘&‘ argument.
So now you can use the Terminal for executing another one while the first ‘burnP6’ is running in the background. Depending on the total of your CPU cores and their threads, calculate how many ‘burnP6’ programs are needed to run, then enter the same command accordingly (for example; if you wanted 8 threads then enter the command 8 times).
As a shortcut (if you’re new), when you’ve executed the command at least once, you can press the up-arrow on the keyboard and the previously entered command will be pasted automatically.
Or, you can combine all those needed running instances into a single chain command as well. For instance, if I wanted to run 4 instances of ‘burnP6’ (without having to enter one after the other) then I can use it in the below format (note there’s a space between each ‘burnP6 &‘ command).
burnP6 & burnP6 & burnP6 & burnP6 &
When you want to terminate them all, simply enter the below command.
Again make sure to replace ‘burnP6’ with the command that you used. You can also kill the individual processes too but since it can complicate things, I won’t go into that here.
You can read its manual by using the below command in your Terminal as well.
So, if you’ve been looking for a simple yet an effective tool that can be run in Ubuntu (or GNU/Linux in general) to put your CPU under stress, then “cpuburn” is an extremely handy tool.
However, as mentioned before, if you don’t know what you’re doing, then please don’t use it, even if you do know what you’re doing, please use it at your own risk :). Special thanks goes to “Robert Redelmeier” for creating it. Good luck.