[Scottish] CPU Testing

Ian Drake, IT, CIR, SE Dunbartonshire scottish at mailman.lug.org.uk
Thu Feb 27 15:20:01 2003


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?

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