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 vs erased space'"
48 echo "set xlabel 'seconds'"
49 echo "set ylabel 'chunks'"
54 while [ ! -e $done_file ]; do
56 tail -$plot_samples $log_file > $trunc_file
63 trap "touch $done_file" INT
65 echo "Start gathering task in background"
67 echo "Run plotting task"
68 drive_gnuplot | gnuplot