Disabling part of the multiprocessor

Hi,
for testing purpose i need to see if my code scales well with the number of multiprocessors.
The best way will be to disable part of the hardware to run the benchmarks. I now there is a tool on Windows to do that but i am on Linux.

There is some way to do that on Linux ?

Thanks.