mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
traffic.cgi: Changed time interval for vnstat graphs from 5 to 1 minute
This keeps the graphs a bit more "updated". From 'man vnstat': '-c (--cache-time) => Update output file only if at least *time* minutes have passed since the previous file update. Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
7b1134ea60
commit
29f35b79c7
@@ -86,15 +86,15 @@ sub display_vnstat
|
||||
if ( $testdata =~ 'enough') {
|
||||
print"No data for $device !<br>";
|
||||
} else {
|
||||
system("/usr/bin/vnstati -c 5 -s -i $device -o /srv/web/ipfire/html/graphs/vnstat-s-$device.png");
|
||||
system("/usr/bin/vnstati -c 1 -s -i $device -o /srv/web/ipfire/html/graphs/vnstat-s-$device.png");
|
||||
# Hour graph
|
||||
system("/usr/bin/vnstati -c 5 -h -i $device -o /srv/web/ipfire/html/graphs/vnstat-h-$device.png");
|
||||
system("/usr/bin/vnstati -c 1 -h -i $device -o /srv/web/ipfire/html/graphs/vnstat-h-$device.png");
|
||||
# Day graph
|
||||
system("/usr/bin/vnstati -c 5 -d -i $device -o /srv/web/ipfire/html/graphs/vnstat-d-$device.png");
|
||||
system("/usr/bin/vnstati -c 1 -d -i $device -o /srv/web/ipfire/html/graphs/vnstat-d-$device.png");
|
||||
# Month graph
|
||||
system("/usr/bin/vnstati -c 5 -m -i $device -o /srv/web/ipfire/html/graphs/vnstat-m-$device.png");
|
||||
system("/usr/bin/vnstati -c 1 -m -i $device -o /srv/web/ipfire/html/graphs/vnstat-m-$device.png");
|
||||
# Top10 graph
|
||||
system("/usr/bin/vnstati -c 5 -t -i $device -o /srv/web/ipfire/html/graphs/vnstat-t-$device.png");
|
||||
system("/usr/bin/vnstati -c 1 -t -i $device -o /srv/web/ipfire/html/graphs/vnstat-t-$device.png");
|
||||
|
||||
# Generate HTML-Table with the graphs
|
||||
print <<END
|
||||
|
||||
Reference in New Issue
Block a user