]> git.somenet.org - root/munin.git/blob - ircch
LICENCE.txt (gpl v3)
[root/munin.git] / ircch
1 #!/bin/sh
2
3 if [ "$1" = "autoconf" ]; then
4         echo "yes"
5         exit 0
6 fi
7
8 if [ "$1" = "config" ]; then
9     echo "graph_title irc channel users"
10     echo "graph_info This graph shows the usercounts in selected channels"
11     echo "graph_category irc"
12     echo "graph_printf %.0lf"
13     echo "graph_scale no"
14     cat /tmp/irc/channels.txt | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".label "$1"\n"$1".draw LINE2" }' | head -n 15
15     exit 0
16 fi
17
18 cat /tmp/irc/channels.txt | grep "#" | sed -E -e 's~#~~g' -e 's~[^a-zA-Z0-9 ]~_~g' | sort -u | sort -k 2nr | awk '{print $1".value "$2 }' | head -n 15
19
20 exit 0