mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2025-04-21 12:27:27 +03:00
ircstat/: end of March 2012 update (and new script to plot mailing lists)
This commit is contained in:
59
ircstat/mlstat
Executable file
59
ircstat/mlstat
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/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
|
||||
for y in 10 11 12; 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
|
||||
Reference in New Issue
Block a user