summaryrefslogtreecommitdiffstats
path: root/kiberpipa/ot/ont/script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kiberpipa/ot/ont/script.sh')
-rw-r--r--kiberpipa/ot/ont/script.sh54
1 files changed, 54 insertions, 0 deletions
diff --git a/kiberpipa/ot/ont/script.sh b/kiberpipa/ot/ont/script.sh
new file mode 100644
index 0000000..8d03a81
--- /dev/null
+++ b/kiberpipa/ot/ont/script.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+vnst=./vnstat
+if [ x"$1" = x"html" ]
+ then
+ echo ""
+ echo "<!DOCTYPE html><html lang=en><head><meta charset=UTF-8 /><title>statistika prometa omre&zcaron;ja</title></head><body><pre>"
+ $vnst --short
+ echo "</pre><hr><pre>"
+ $vnst --days
+ echo "</pre><hr><pre>"
+ $vnst --fiveminutes
+ echo "</pre><hr><pre>"
+ $vnst --hours
+ echo "</pre><hr><pre>"
+ $vnst --hoursgraph
+ echo "</pre><hr><pre>"
+ $vnst --months
+ echo "</pre><hr><pre>"
+ $vnst --top
+ echo "</pre><hr><pre>"
+ $vnst --traffic
+ echo "</pre><hr><pre>"
+ $vnst --years
+ echo "</pre></body></html>"
+ exit
+fi
+while :
+do
+ $0 html | nc 192.168.8.87 8678
+ ./vnstati -5 -o /tmp/5.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8600 < /tmp/5.png
+ ./vnstati -5g -o /tmp/5g.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8601 < /tmp/5g.png
+ ./vnstati -h -o /tmp/h.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8602 < /tmp/h.png
+ ./vnstati -hg -o /tmp/hg.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8603 < /tmp/hg.png
+ ./vnstati -d -o /tmp/d.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8604 < /tmp/d.png
+ ./vnstati -m -o /tmp/m.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8605 < /tmp/m.png
+ ./vnstati -y -o /tmp/y.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8606 < /tmp/y.png
+ ./vnstati -t -o /tmp/t.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8607 < /tmp/t.png
+ ./vnstati -s -o /tmp/s.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8608 < /tmp/s.png
+ ./vnstati -hs -o /tmp/hs.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8609 < /tmp/hs.png
+ ./vnstati -vs -o /tmp/vs.png --headertext http://4a.si/ont.shtml
+ nc 192.168.8.87 8610 < /tmp/vs.png
+ sleep 256
+done
+