diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-02-02 01:20:45 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-02-02 01:20:45 +0100 |
commit | 19cebcdb869350fdb8fe504d773d7d404d1c8166 (patch) | |
tree | df546736eb75979e2cb8bcdb00603024e5cdfd36 /kiberpipa/ot/ont/script.sh | |
download | r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar.gz r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar.bz2 r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar.lz r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar.xz r-19cebcdb869350fdb8fe504d773d7d404d1c8166.tar.zst r-19cebcdb869350fdb8fe504d773d7d404d1c8166.zip |
Diffstat (limited to 'kiberpipa/ot/ont/script.sh')
-rw-r--r-- | kiberpipa/ot/ont/script.sh | 54 |
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ž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 + |