Mercurial > yaffs-ecoscentric-gpl
changeset 422:71c8b6ae0a24
Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
| author | Charles Manning <cdhmanning@gmail.com> |
|---|---|
| date | Fri, 07 May 2010 10:08:22 +1200 |
| parents | c17199cb882d (current diff) 24323a6af10c (diff) |
| children | 29b309f8db6a |
| files | |
| diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/linux-tests/plot_data.sh +++ b/linux-tests/plot_data.sh @@ -7,6 +7,8 @@ log_file=data gather_delay=1 +done_file=plot_done + # Plot settings trunc_file=trunc_data plot_samples=1000 @@ -14,13 +16,15 @@ plot_delay=2 + + # Gathering task gather_data() { i=0; rm -f $log_file -while true; do +while [ ! -e $done_file ] ; do str=$(cat /proc/yaffs_stats) echo "$i, $str" echo "$i, $str" >> $log_file @@ -44,7 +48,7 @@ echo "set title 'yaffs free space and er echo $plot_str -while true; do +while [ ! -e $done_file ]; do sleep $plot_delay tail -$plot_samples $log_file > $trunc_file echo replot @@ -52,9 +56,15 @@ done } +rm -f $done_file +trap "touch $done_file" INT echo "Start gathering task in background" gather_data & echo "Run plotting task" drive_gnuplot | gnuplot +wait + +echo "All done" +
