I dont know is it logical or rational, but could not get sleep and got an idea and made some scripts:
1) collect stats
# m h dom mon dow command
*/5 * * * *home/pi/get_stat.sh
#!/bin/sh
catrun/shm/.stat.log | sed -E "s/[[:space:]]+/:/g" | cut -d ":" -f 1,3,4,5,6,7 | head -n 16 >>home/pi/rw-stat.log
note I'm cutting 1st 16 lines there
then when it has run for some time, made this:
pi@bitfury ~ $ awk -F':' '{print $1,$4-($6*100/$5/100*$4),$2,$4,$5,$6; }' rw-stat.log | sort -r | uniq -f 3 | uniq -w 2 | sort -n | awk '{ if ( $2 ~[0-9]/ ) s+=$2;print $0;} END {printf "total: "s" Ghash/s\n"}'
result:
1 2.283 55 2.283 145 0
2 2.14944 55 2.177 158 2
3 2.135 55 2.135 169 0
4 2.177 55 2.177 167 0
5 1.97943 55 2.093 129 7
6 1.839 55 1.839 144 0
7 -nan 0 0.000 0 0
8 2.1187 55 2.135 131 1
9 2.315 55 2.315 172 0
10 2.23799 55 2.336 143 6
11 2.209 55 2.209 162 0
12 2.20839 56 2.283 153 5
13 2.072 55 2.072 156 0
14 2.19 55 2.220 148 2
15 2.26272 55 2.357 175 7
16 2.346 55 2.346 180 0
total: 32.5227 Ghash/s
explaning by columns:
1 - chip number
2 - Ghash/sec substracted % of error
3 - chip speed
4 - Ghash/sec from log
5 - Nonces/round
6 - false nonces
Idea was to let autotune to do the tuning for some days and then find the best setting where speed is highest while some errors are allowed. I was thinking that 2Ghash/s with 10% errors is 1.8Ghash/s and it is better that lower speed and 1.7Ghash/sec
maybe someone can get some ideas here or if my sleepy mind was useful (3.51AM at the moment) we can clean up that long and messy shell line.. and format output..
EDIT: added total has sum to the output end (this: 32.5227)