[Scottish] CPU Testing

Iain Conochie scottish at mailman.lug.org.uk
Thu Feb 27 16:04:01 2003


Ian Drake, IT, CIR, SE Dunbartonshire wrote:

>I'm currently setting up MRTG to graph my CPU usage, but I need something to
>help prove what I've done works, anyone got a short piece of C code that'll
>push the gas peddle on my Linux box and keep the cpu cycles high for a few
>mins?
>  
>

Don't run this on a production box!!!!


int main ()

{
    fork()
}

That should stress your box to the level of killing it :)


>Rgds,
>
>Ian
>
>PS I'm basically doing :-
>
>cat /proc/stat | /usr/bin/awk '/cpu /{print $2+$3; print $2+$3+$4; print
>"quite some time"; print "home"}
>in my MRTG conf file
>
>
>
>_______________________________________________
>Scottish mailing list
>Scottish@mailman.lug.org.uk
>http://mailman.lug.org.uk/mailman/listinfo/scottish
>
>  
>