From 19cebcdb869350fdb8fe504d773d7d404d1c8166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Thu, 2 Feb 2023 01:20:45 +0100 Subject: konc --- kiberpipa/ot/ont/script.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 kiberpipa/ot/ont/script.sh (limited to 'kiberpipa/ot/ont/script.sh') 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 "statistika prometa omrežja
"
+        $vnst --short
+        echo "

"
+        $vnst --days
+        echo "

"
+        $vnst --fiveminutes
+        echo "

"
+        $vnst --hours
+        echo "

"
+        $vnst --hoursgraph
+        echo "

"
+        $vnst --months
+        echo "

"
+        $vnst --top
+        echo "

"
+        $vnst --traffic
+        echo "

"
+        $vnst --years
+        echo "
" + 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 + -- cgit v1.2.3