Add yearly network statistics and remove text-based hourly statistics
This commit is contained in:
parent
ed03c2646e
commit
550f1ee1cb
|
@ -20,11 +20,11 @@ webstat () {
|
||||||
echo '<h2>Memory:</h2><pre>'"$(free -h)"'</pre><br>'
|
echo '<h2>Memory:</h2><pre>'"$(free -h)"'</pre><br>'
|
||||||
echo '<h2>Uptime:</h2><pre>'"$(uptime)"'</pre><br>'
|
echo '<h2>Uptime:</h2><pre>'"$(uptime)"'</pre><br>'
|
||||||
echo '<h2>Network Usage:</h2>'
|
echo '<h2>Network Usage:</h2>'
|
||||||
echo -e "<img src=\"data:image/png;base64,$(vnstati -i $interface1 -m -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface1 -d -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface1 -h -o - | base64 -w0)\">"
|
echo -e "<img src=\"data:image/png;base64,$(vnstati -i $interface1 -y -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface1 -m -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface1 -d -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface1 -h -o - | base64 -w0)\">"
|
||||||
echo "<pre>$(vnstat -i $interface1 -h | tail -n 9)</pre>"
|
#echo "<pre>$(vnstat -i $interface1 -h | tail -n 9)</pre>"
|
||||||
if [ ! -z $interface2 ]; then
|
if [ ! -z $interface2 ]; then
|
||||||
echo -e "<br><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -m -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -d -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -h -o - | base64 -w0)\">"
|
echo -e "<img src=\"data:image/png;base64,$(vnstati -i $interface2 -y -o - | base64 -w0)\"><br><br><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -m -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -d -o - | base64 -w0)\"><br><img src=\"data:image/png;base64,$(vnstati -i $interface2 -h -o - | base64 -w0)\">"
|
||||||
echo "<pre>$(vnstat -i $interface2 -h | tail -n 9)</pre>"
|
#echo "<pre>$(vnstat -i $interface2 -h | tail -n 9)</pre>"
|
||||||
fi
|
fi
|
||||||
echo '</body></html>'
|
echo '</body></html>'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue