X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=linux-tests%2Fplot_data.sh;h=59c26b085a8d8dce6a5b72d0ed7426792191d633;hp=dcc1de3c951f8ee68fec238bfae663eb0e9854bf;hb=3788df745cd72e035c0c991157cb727a8ecb1f17;hpb=fcc9631a249a467718a7ae67c58ae1ab29e5d034 diff --git a/linux-tests/plot_data.sh b/linux-tests/plot_data.sh index dcc1de3..59c26b0 100755 --- a/linux-tests/plot_data.sh +++ b/linux-tests/plot_data.sh @@ -1,4 +1,4 @@ -#!/bin/sh +\#!/bin/sh # Script that gathers data erased vs free data from /proc/yaffs_stats and simultaneously \ # plots it using gnuplot. @@ -25,11 +25,15 @@ i=0; rm -f $log_file while [ ! -e $done_file ] ; do -str=$(cat /proc/yaffs_stats) -echo "$i, $str" -echo "$i, $str" >> $log_file -i=$(($i+1)) -sleep $gather_delay + erased_blocks=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2) + free_chunks=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2) + + erased_chunks=$(($erased_blocks*64)) + str=" $i, 0, $free_chunks, $erased_chunks" + echo $str + echo $str >> $log_file + i=$(($i+1)) + sleep $gather_delay done }