1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-23 03:55:21 +02:00
wernermisc/ircstat/mlstat

60 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/sh
list=
while read l; do
case "$l" in
*qi-hardware*)
list=q;;
*milkymist*)
list=m;;
20*) set -- `echo "$l" | sed "s/ / -/g"`
y=$1
for m in 1 2 3 4 5 6 7 8 9 10 11 12; do
shift
[ "$1" ] || break
if [ "$1" = - ]; then
v=
else
v=$1
fi
eval ${list}_${y}_${m}=$v
done
esac
done <ML
N=3
t=
>_out
n=0
off=2
2013-02-01 06:54:49 +02:00
for y in 10 11 12 13; do
for m in 1 2 3 4 5 6 7 8 9 10 11 12; do
mm=`printf "%02d" $m`
qn=`eval echo \\$q_20${y}_${m}`
mn=`eval echo \\$m_20${y}_${m}`
[ -z "$qn" -a -z "$mn" ] && 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
echo ${qn:-0} ${mn:-0} >>_out
n=`expr $n + 1`
done
done
gnuplot -persist <<EOF
set xtics ($t)
set grid xtics
set title "Traffic on the Qi-Hardware Mailing Lists"
set xlabel "Month"
set ylabel "Traffic (kbytes gzip'ed)"
plot "_out" using (\$1) with lines title "qi-hardware" lw 2, \
"_out" using (\$2) with lines title "milkymist" lw 2, \
"_out" using :(\$1+\$2) with lines title "Both" lw 2
set term png
set output "out.png"
replot
EOF