Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
Source at commit 1b9eddfe72f86d904c8513e77e9eb14137d103ee created 11 years 11 months ago. By Werner Almesberger, ircstat/: end of March 2012 update (and new script to plot mailing lists) | |
---|---|
1 | #!/bin/sh |
2 | Q=en.qi-hardware.com/irclogs/qi-hardware |
3 | M=en.qi-hardware.com/mmlogs/milkymist |
4 | # Saving to: `en.qi-hardware.com/irclogs/qi-hardware_2010-06-11.log.html' |
5 | |
6 | N=3 |
7 | t= |
8 | >_out |
9 | n=0 |
10 | off=2 |
11 | for y in 10 11 12; do |
12 | for m in 1 2 3 4 5 6 7 8 9 10 11 12; do |
13 | mm=`printf "%02d" $m` |
14 | [ "`echo ${Q}_20${y}-${mm}-*`" = "${Q}_20${y}-${mm}-*" ] && |
15 | [ "`echo ${M}_20${y}-${mm}-*`" = "${M}_20${y}-${mm}-*" ] && |
16 | continue |
17 | if [ `expr $n % $N` = 0 ]; then |
18 | [ "$t" ] && t=$t, |
19 | t="$t \"$m/$y\" $n" |
20 | else |
21 | t="$t, \"\" $n" |
22 | fi |
23 | # cat ${Q}_20${y}-${mm}-*.log.html | gzip -9 | wc -c >>_out |
24 | qn=`sed 's/<[^>]*>/ /g' ${Q}_20${y}-${mm}-*.log.html | |
25 | gzip -9 | wc -c` |
26 | mn=`sed 's/<[^>]*>/ /g' ${M}_20${y}-${mm}-*.log.html | |
27 | gzip -9 | wc -c` |
28 | echo $qn $mn >>_out |
29 | n=`expr $n + 1` |
30 | done |
31 | done |
32 | |
33 | gnuplot -persist <<EOF |
34 | set xtics ($t) |
35 | set grid xtics |
36 | set title "Traffic on the Qi-Hardware IRC channels" |
37 | set xlabel "Month" |
38 | set ylabel "Traffic (kbytes gzip'ed)" |
39 | plot "<sed '\$d' _out" using (\$1/1000) with lines title "#qi-hardware" lw 2, \ |
40 | "<sed '\$d' _out" using (\$2/1000) with lines title "#milkymist" lw 2, \ |
41 | "<sed '\$d' _out" using :((\$1+\$2)/1000) with lines title "Both" lw 2 |
42 | set term png |
43 | set output "out.png" |
44 | replot |
45 | EOF |
46 |
Branches:
master