2011-08-08 23:27:53 +03:00
|
|
|
#!/bin/sh
|
|
|
|
Q=en.qi-hardware.com/irclogs/qi-hardware
|
|
|
|
M=en.qi-hardware.com/mmlogs/milkymist
|
|
|
|
# Saving to: `en.qi-hardware.com/irclogs/qi-hardware_2010-06-11.log.html'
|
|
|
|
|
2012-04-06 20:15:28 +03:00
|
|
|
N=3
|
2011-08-08 23:27:53 +03:00
|
|
|
t=
|
|
|
|
>_out
|
|
|
|
n=0
|
2012-04-06 20:15:28 +03:00
|
|
|
off=2
|
2012-01-18 21:36:09 +02:00
|
|
|
for y in 10 11 12; do
|
2011-08-08 23:27:53 +03:00
|
|
|
for m in 1 2 3 4 5 6 7 8 9 10 11 12; do
|
|
|
|
mm=`printf "%02d" $m`
|
|
|
|
[ "`echo ${Q}_20${y}-${mm}-*`" = "${Q}_20${y}-${mm}-*" ] &&
|
|
|
|
[ "`echo ${M}_20${y}-${mm}-*`" = "${M}_20${y}-${mm}-*" ] &&
|
|
|
|
continue
|
|
|
|
if [ `expr $n % $N` = 0 ]; then
|
|
|
|
[ "$t" ] && t=$t,
|
|
|
|
t="$t \"$m/$y\" $n"
|
|
|
|
else
|
|
|
|
t="$t, \"\" $n"
|
|
|
|
fi
|
|
|
|
# cat ${Q}_20${y}-${mm}-*.log.html | gzip -9 | wc -c >>_out
|
|
|
|
qn=`sed 's/<[^>]*>/ /g' ${Q}_20${y}-${mm}-*.log.html |
|
|
|
|
gzip -9 | wc -c`
|
|
|
|
mn=`sed 's/<[^>]*>/ /g' ${M}_20${y}-${mm}-*.log.html |
|
|
|
|
gzip -9 | wc -c`
|
|
|
|
echo $qn $mn >>_out
|
|
|
|
n=`expr $n + 1`
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
2012-05-30 19:06:20 +03:00
|
|
|
src="<sed '\$d' _out"
|
|
|
|
|
2011-08-08 23:27:53 +03:00
|
|
|
gnuplot -persist <<EOF
|
|
|
|
set xtics ($t)
|
|
|
|
set grid xtics
|
|
|
|
set title "Traffic on the Qi-Hardware IRC channels"
|
|
|
|
set xlabel "Month"
|
|
|
|
set ylabel "Traffic (kbytes gzip'ed)"
|
2012-05-30 19:06:20 +03:00
|
|
|
plot "$src" using (\$1/1000) with lines title "#qi-hardware" lw 2, \
|
|
|
|
"$src" using (\$2/1000) with lines title "#milkymist" lw 2, \
|
|
|
|
"$src" using :((\$1+\$2)/1000) with lines title "Both" lw 2
|
2011-08-08 23:27:53 +03:00
|
|
|
set term png
|
|
|
|
set output "out.png"
|
|
|
|
replot
|
|
|
|
EOF
|