Max CPU load in *nix

Scott asked:

I am running an Ubuntu 12.04 server via a virtual machine (it is running on vmware’s ESXi hypervisor) but I am not convinced it has full access to the 8 CPUs that I have assigned to it. My physical server has 2 phyiscal chips with 4 physical cores. I assigned this same configuration to my virtual server. Unfortunately I have never seen any single process get above 12.5% CPU load and I am thinking there might be an issue with my config.

TL:DR – What is the easiest way to max my CPU usage via CLI for testing purposes?

My answer:

100% / 8 = 12.5. You’re maxing out only one of your 8 possible cores. Run a multi-threaded program.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.