simulate cpu load for your server

This scripts will detect how much cpu processor on your server and simulate “fake” load, don’t do this on production server as this will blow up your entire system. ‘cpu’ is just a variable


cpu_total=`cat /proc/cpuinfo | grep processor | wc -l`
for cpu in $(seq 1 $cpu_total)
do
( while true; do true; done ) &
done

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s