summaryrefslogblamecommitdiffstats
path: root/kiberpipa/ot/ont/script.sh
blob: 8d03a81ec4df30316e4dfffa607b40513b678f15 (plain) (tree)





















































                                                                                                                                          
#!/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