diff options
author | James Meyer <james.meyer@operamail.com> | 2009-08-01 03:14:54 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-08-01 03:14:54 (GMT) |
commit | 7b35632e80f168d8c5f2220bf610ee7e24b81270 (patch) | |
tree | 8facf3fa565911f056a08e38f6a5eed0f756f9c6 /abs/extra-testing/graphload/graphload.sh | |
parent | 7e10f51870aa10be3b35d7912a7b54e30f608bb8 (diff) | |
parent | 7accc0f042acdfdca9f067b1d4011d6ac01b1a74 (diff) | |
download | linhes_pkgbuild-7b35632e80f168d8c5f2220bf610ee7e24b81270.zip linhes_pkgbuild-7b35632e80f168d8c5f2220bf610ee7e24b81270.tar.gz linhes_pkgbuild-7b35632e80f168d8c5f2220bf610ee7e24b81270.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Conflicts:
abs/core-testing/LinHES-config/PKGBUILD
Diffstat (limited to 'abs/extra-testing/graphload/graphload.sh')
-rwxr-xr-x | abs/extra-testing/graphload/graphload.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/abs/extra-testing/graphload/graphload.sh b/abs/extra-testing/graphload/graphload.sh new file mode 100755 index 0000000..79023ec --- /dev/null +++ b/abs/extra-testing/graphload/graphload.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +MYTICKS=100 +MYINTERVAL=4 # we sample once every $MYINTERVAL seconds +MYINVERSEINTERVAL=0.25 + +top -d $MYINVERSEINTERVAL -n $MYTICKS -b -i | grep Cpu | perl -e "while(<>) { split(','); \$load = 100 - substr @_[3], 0, -3; print \$load,\"\n\";}" > profile +perl -e '$second=0; while(<>) { chop(); $load = $_; print "$second $load "; split " ", $load; print @_[0] + @_[1], "\n"; $second+=0.25;}' < profile > points +echo "set grid +set xrange [0: $(($MYTICKS/$MYINTERVAL))] +set yrange [0: 101] +set xtics 0,$MYINVERSEINTERVAL,$(($MYTICKS/$MYINTERVAL)) +set xlabel \"time\" +set ylabel \"CPU usage\" +plot \"points\" using 1:2 with lines title 'total load' +replot" > gplot.cmds +gnuplot -persist gplot.cmds |