###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
-require "${General::swroot}/net-traffic/net-traffic-admin.pl";
-require "${General::swroot}/net-traffic/net-traffic-lib.pl";
my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
my %cgiparams;
my %pppsettings;
if ( $testdata =~ 'enough') {
print"No data for $device !<br>";
} else {
- # Falls back to textoutput if there was no % value because vnstati hang in this case
- if (!($testdata =~ 'nan%')) {
- system("/usr/bin/vnstati -c 5 -s -i $device -o /srv/web/ipfire/html/graphs/vnstat-s-$device.png");
- }
+ # Summary
+ system("/usr/bin/vnstati -c 1 -s -i $device -o /srv/web/ipfire/html/graphs/vnstat-s-$device.png");
+ # 5-minute graphs
+ system("/usr/bin/vnstati -c 1 -5 -i $device -o /srv/web/ipfire/html/graphs/vnstat-5-$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 "<table>";
- if ($testdata =~ 'nan%') {
- print "<tr><td><b><pre>";
- system("/usr/bin/vnstat -i $device");
- print "</pre></b></td></tr>";
- } else {
- print"<tr><td><img src=\"/graphs/vnstat-s-$device.png\"></td></tr>";
- }
print <<END
+<table>
+<tr><td><img src="/graphs/vnstat-s-$device.png"></td></tr>
+<tr><td><img src="/graphs/vnstat-5-$device.png"></td></tr>
<tr><td><img src="/graphs/vnstat-h-$device.png"></td></tr>
<tr><td><img src="/graphs/vnstat-d-$device.png"></td></tr>
<tr><td><img src="/graphs/vnstat-m-$device.png"></td></tr>