Created
June 22, 2010 00:32
-
-
Save Ttech/447752 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE="/srv/samba/data/irc/botters-users.txt" | |
DATE_START=`/bin/cat $FILE | /usr/bin/head -n1` | |
DATE_END=`/bin/cat ${FILE} | /usr/bin/tail -n1 | /bin/sed -e 's/01 .*/01/g'` | |
cat <<'EOF' | |
reset | |
set terminal png size 1024,600 | |
#set output "users.png" | |
set xdata time | |
set timefmt "%m/%d/%Y %H:%M:%S" | |
set format x "%m/%d" | |
set xlabel "time" | |
set ylabel "total users (30m)" | |
EOF | |
echo "set xrange [\"`/bin/echo $DATE_START`\":\"`/bin/echo $DATE_END`\"]" | |
echo "set yrange [0:60]" | |
echo "set title \"Total Users Botters (#botters) from `/bin/echo $DATE_START | /bin/sed -e 's/ .*//g'` to `/bin/echo $DATE_END | /bin/sed -e 's/ .*//g'`\"" | |
cat <<'EOF' | |
set key Left outside | |
set grid | |
set style data line | |
plot "/srv/samba/data/irc/botters-users.txt" using 1:3 title "Users" | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment