Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am playing around with htop, gprof, etc. I'd like a program that basically just runs on multiple cores so I can profile it and learn how to use these tools. I know I can write my own c++ code with -fopenmp and run a useless loop, but I was hoping there's a stock unix command I can use?

Basically I just want a program that uses 100% of however many cores I tell it, until I ask it to stop. Does this exist?

share|improve this question
can't you just run a single core program (e.g., md5sum /dev/urandom) twice or more time in parallel? – pqnet Aug 25 '14 at 1:52
@pqnet yeah but it won't show up as a single process running on multiple threads. – quant Aug 25 '14 at 2:25
up vote 6 down vote accepted

Not stock, but here are a few tool I have used before:

share|improve this answer
Very nice. I already had stress installed and it worked like a charm (I used stress -n 4 to run on 4 cores). – quant Aug 25 '14 at 4:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.