Welcome to your wiki!
This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
The wiki uses Markdown syntax.
One night I decided to write my own CPU burning utility for Linux for lack of a dedicated open source tool.
My tool will detect number of CPU cores you have on your system and load corresponding number of threads. The benefit over shell for-loop scripts is that it not just executes CPU commands in a loop - it also reads and writes potentially large amounts of data in memory, thus utilizing memory controller and north bridge/bus, thus creating load on entire CPU system.
You have control over payload with command line parameters.
The tool is so simple that you can get source code here and compile your own, no need to d/l .tar.gz!
The methods I've used to enumerate CPU cores would work on FreeBSD and Linux - the only two O/Ss where I had an opportunity to test. It should work on AIX, BSD, HP-UX, Solaris, SGI and others. If it does not work for you, google is your friend and finding CPU enumeration code is not too difficult.
You can also change the algorithm used for creating CPU load down at the very end. I used random calculations that my hands typed, they do not in any way pretend to be smart in a sense that they would create heavy load, crafted for any kind of CPU architecture. This is a very rudimentary tool that does the trick of bringing my own CPU's temperature to the top.
Proceed to the Files section and download two files: cpuburn_smp.cpp and makefile.
In order to build cpuburn, you are going to need GNU C++ compiler and make.
Type 'make' in the folder where you downloaded both files and it will build an executable cpuburn_smp.
No special installation required. You can copy cpuburn_smp into /usr/local/bin if you like, or leave it where you compiled.
When invoked from command line, cpuburn_smp will print a short help and automatically start # of threads equal to your CPU core count, using 65535 byte memory buffers.
You can control both thread count and memory buffer size using command line arguments:
CPU burn goes multiplatform! Added support for most major UNIX systems: BSD, HP-UX (needs testing) AIX, Solaris etc. Check source code for all defines.
Added FreeBSD 10 and Solaris 11 binaries.
Log in to post a comment.