2 # Script that gathers data erased vs free data from /proc/yaffs_stats and simultaneously \
3 # plots it using gnuplot.
24 str=$(cat /proc/yaffs_debug)
26 echo "$i, $str" >> $log_file
34 # Periodically creates a truncated version of the log file and
35 # outputs commands into gnuplot, thus driving gnuplot
39 tail -$plot_samples $log_file > $trunc_file
41 plot_str=" plot '$trunc_file' using 1:3 with linespoints title 'free', '' using 1:4 with linespoints title 'erased'"
43 echo "set title 'yaffs free space and erased space'"
49 tail -$plot_samples $log_file > $trunc_file
56 echo "Start gathering task in background"
58 echo "Run plotting task"
59 drive_gnuplot | gnuplot