A controlled CPU HOG load test – Change the number to the number of CPU's3>
#!/usr/bin/perl
print "Eating the CPUs\n";
foreach $i (1..16) {
$pid = fork();
last if $pid == 0;
print "Created PID $pid\n";
}
while (1) {
$x++;
}
Another form of loading all cpu’s, might not work in latest Linux bash releases
Note: Make sure you are not running anything important on the system (docker or zone), as it will max all cpus.
:(){:|:&};: