Skip to content

Instantly share code, notes, and snippets.

View IgorLeMasson's full-sized avatar

Igor Le Masson IgorLeMasson

View GitHub Profile
@yalla
yalla / cpu_stress.sh
Created August 9, 2011 12:29
Small CPU load testing script which uses openssl and is kinda bulletproof on Linux.
#!/bin/bash
NUMCPUS=`grep -c processor /proc/cpuinfo`
if [ -z "$1" ] ; then
NUMINSTANCES=2
else
echo $1 | grep "^[0-9]*$" >/dev/null
if [ "$?" -ne 0 ] ; then
echo Argument $1 is not a number. Aborting.