Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 at 1:52
    
@pqnet yeah but it won't show up as a single process running on multiple threads. –  quant Aug 25 at 2:25

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
2  
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 at 4:08

Your Answer

 
discard

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.