cpuburn: CPU Stress Tester for Ubuntu Linux

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).

Main features

*. 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.

burnP6

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).

burnP6 &

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.

killall burnP6

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.

man cpuburn

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.

11 thoughts on “cpuburn: CPU Stress Tester for Ubuntu Linux

    1. Gayan Post author

      Thanks for the suggestion 'Kasper' :). 'psensor' does not work in my Dell notebook though. But it works for you, then yes, it's highly recommended. Thanks again man.

    1. Gayan Post author

      Hey 'Roy',

      I know! :P. Seriously though, I think you're right. It's lame to do that, so I've updated the post with a better suggestion.

  1. Matheus de Oliveira (MatheusOl)

    I think a good solution to avoid opening tabs on terminal and using killall to stop (as I think running it on background is “really” dangerous), you can use xargs and the -P option to run parallel process:

    NUM_CORES=`grep ‘^processor’ /proc/cpuinfo | wc -l`
    for i in {1..$NUM_CORES}; do echo burnP6; done | xargs -L 1 -P $NUM_CORES sh -c

    To stop, just press Ctrl+C.

    If you don’t want to burn all cores, you can change NUM_CORES to any value you want.

    1. Matheus de Oliveira (MatheusOl)

      Ops… The second line is wrong, it should be:

      for i in `seq 1 $NUM_CORES`; do echo burnP6; done | xargs -L 1 -P $NUM_CORES sh -c

  2. Hemant

    If hyper threading is enabled than grep ‘^processor’ /proc/cpuinfo will display as many processors as the number of thread. for example if you have 2 cores each with 2 thread than the above grep command will display 4 processors.

    1. Gayan Post author

      True, but if you want to fully stress the whole CPU, then you have to put all of the cores (including the logical ones) under pressure, right ?

  3. Volvox

    Does this program validates it’s calculations? If my processor returns invalid result (because of overheating or faulty processor/memmory) will it show error?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>