2 # Script that gathers data erased vs free data from /proc/yaffs_stats and simultaneously \
3 # plots it using gnuplot.
27 while [ ! -e $done_file ] ; do
28 str=$(cat /proc/yaffs_stats)
30 echo "$i, $str" >> $log_file
38 # Periodically creates a truncated version of the log file and
39 # outputs commands into gnuplot, thus driving gnuplot
43 tail -$plot_samples $log_file > $trunc_file
45 plot_str=" plot '$trunc_file' using 1:3 with linespoints title 'free', '' using 1:4 with linespoints title 'erased'"
47 echo "set title 'yaffs free space and erased space'"
51 while [ ! -e $done_file ]; do
53 tail -$plot_samples $log_file > $trunc_file
60 trap "touch $done_file" INT
62 echo "Start gathering task in background"
64 echo "Run plotting task"
65 drive_gnuplot | gnuplot