mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 04:52:59 +02:00
Updated samba to stable 30
Added Multi Ping Destination Option for Graphs
This commit is contained in:
@@ -401,16 +401,17 @@ sub updatefwhitsgraph {
|
||||
|
||||
# Generate the Line Quality Graph for the current period of time for values given by collecd
|
||||
|
||||
sub updatelqgraph {
|
||||
sub updatepinggraph {
|
||||
my $period = $_[0];
|
||||
RRDs::graph ("$graphs/lq-$period.png",
|
||||
my $host = $_[1];
|
||||
RRDs::graph ("$graphs/$host-$period.png",
|
||||
"--start", "-1$period", "-aPNG", "-i", "-W www.ipfire.org",
|
||||
"--alt-y-grid", "-w 600", "-h 125", "-l 0", "-r", "-v ms",
|
||||
"-t $Lang::tr{'linkq'} $Lang::tr{'graph per'} $Lang::tr{$period}",
|
||||
"-t $Lang::tr{'linkq'} $host $Lang::tr{'graph per'} $Lang::tr{$period}",
|
||||
"--color", "SHADEA".$color{"color19"},
|
||||
"--color", "SHADEB".$color{"color19"},
|
||||
"--color", "BACK".$color{"color21"},
|
||||
"DEF:roundtrip=$rrdlog/collectd/localhost/ping/ping-gateway.rrd:ping:AVERAGE",
|
||||
"DEF:roundtrip=$rrdlog/collectd/localhost/ping/ping-$host.rrd:ping:AVERAGE",
|
||||
"COMMENT:$Lang::".sprintf("%-20s",$Lang::tr{'caption'})."\\j",
|
||||
"CDEF:roundavg=roundtrip,PREV(roundtrip),+,2,/",
|
||||
"CDEF:r0=roundtrip,30,MIN",
|
||||
@@ -422,10 +423,9 @@ sub updatelqgraph {
|
||||
"AREA:r2".$color{"color14"}."A0:70-150 ms",
|
||||
"AREA:r1".$color{"color17"}."A0:30-70 ms",
|
||||
"AREA:r0".$color{"color12"}."A0:<30 ms\\j",
|
||||
"COMMENT:".sprintf("%-15s",$Lang::tr{'maximal'}),
|
||||
"COMMENT:".sprintf("%15s",$Lang::tr{'average'}),
|
||||
"COMMENT:".sprintf("%15s",$Lang::tr{'minimal'}),
|
||||
"COMMENT:".sprintf("%15s",$Lang::tr{'current'})."\\j",
|
||||
"COMMENT:$Lang::tr{'maximal'}",
|
||||
"COMMENT:$Lang::tr{'average'}",
|
||||
"COMMENT:$Lang::tr{'minimal'}","COMMENT:$Lang::tr{'current'}\\j",
|
||||
"LINE1:roundtrip#707070:",
|
||||
"GPRINT:roundtrip:MAX:%3.2lf ms",
|
||||
"GPRINT:roundtrip:AVERAGE:%3.2lf ms",
|
||||
|
||||
@@ -4,4 +4,7 @@ usr/bin/bc
|
||||
usr/bin/dc
|
||||
srv/web/ipfire/cgi-bin/pakfire.cgi
|
||||
srv/web/ipfire/cgi-bin/qos.cgi
|
||||
srv/web/ipfire/cgi-bin/network.cgi
|
||||
srv/web/ipfire/cgi-bin/graphs.cgi
|
||||
var/ipfire/langs
|
||||
var/ipfire/graphs.pl
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
* centerim-4.22.1
|
||||
* clamav-0.93
|
||||
* cmake-2.4.8
|
||||
* collectd-4.3.0
|
||||
* collectd-4.4.0
|
||||
* coreutils-5.96
|
||||
* cpio-2.6
|
||||
@@ -242,8 +241,8 @@
|
||||
* rrdtool-1.2.15
|
||||
* rsync-2.6.9
|
||||
* rtorrent-0.7.9
|
||||
* samba-3.0.28a
|
||||
* samba-3.0.29
|
||||
* samba-3.0.30
|
||||
* sane-1.0.19
|
||||
* sane-1.0.19-kmod
|
||||
* screen-4.0.3
|
||||
|
||||
@@ -45,6 +45,7 @@ my $graphdir = "/srv/web/ipfire/html/graphs";
|
||||
$ENV{'QUERY_STRING'} =~ s/&//g;
|
||||
@cgigraphs = split(/graph=/,$ENV{'QUERY_STRING'});
|
||||
$cgigraphs[1] = '' unless defined $cgigraphs[1];
|
||||
$cgigraphs[2] = '' unless defined $cgigraphs[2];
|
||||
|
||||
if ($cgigraphs[1] =~ /(load)/) {&Graphs::updateloadgraph ("hour");&Graphs::updateloadgraph ("week");&Graphs::updateloadgraph ("month");&Graphs::updateloadgraph ("year");}
|
||||
if ($cgigraphs[1] =~ /(cpu)/) {&Graphs::updatecpugraph ("hour");&Graphs::updatecpugraph ("week");&Graphs::updatecpugraph ("month");&Graphs::updatecpugraph ("year");}
|
||||
@@ -59,11 +60,11 @@ if ($cgigraphs[1] =~ /disk/){
|
||||
&Graphs::updatediskgraph ("week",$device);
|
||||
&Graphs::updatediskgraph ("month",$device);
|
||||
&Graphs::updatediskgraph ("year",$device);}}
|
||||
if ($cgigraphs[1] =~ /lq/) {&Graphs::updatelqgraph("hour");&Graphs::updatelqgraph("week");&Graphs::updatelqgraph("month");&Graphs::updatelqgraph("year");}
|
||||
if ($cgigraphs[2] ne "" ) {&Graphs::updatepinggraph("hour",$cgigraphs[1]);&Graphs::updatepinggraph("week",$cgigraphs[1]);&Graphs::updatepinggraph("month",$cgigraphs[1]);&Graphs::updatepinggraph("year",$cgigraphs[1]);}
|
||||
if ($cgigraphs[1] =~ /fwhits/) {&Graphs::updatefwhitsgraph("hour");&Graphs::updatefwhitsgraph("week");&Graphs::updatefwhitsgraph("month");&Graphs::updatefwhitsgraph("year");}
|
||||
if ($cgigraphs[1] =~ /green/ || $cgigraphs[1] =~ /blue/ || $cgigraphs[1] =~ /ipsec/ || $cgigraphs[1] =~ /orange/ || $cgigraphs[1] =~ /red/ ) {&Graphs::updateifgraph($cgigraphs[1], "hour");&Graphs::updateifgraph($cgigraphs[1], "week");&Graphs::updateifgraph($cgigraphs[1], "month");&Graphs::updateifgraph($cgigraphs[1], "year");}
|
||||
|
||||
if ($cgigraphs[1] =~ /(network|green|blue|orange|red|ipsec|lq)/) {
|
||||
if ($cgigraphs[1] =~ /(network|green|blue|orange|red|ipsec)/ || $cgigraphs[2] ne "") {
|
||||
&Header::openpage($Lang::tr{'network traffic graphs'}, 1, '');
|
||||
} else {
|
||||
&Header::openpage($Lang::tr{'system graphs'}, 1, '');
|
||||
@@ -71,7 +72,7 @@ if ($cgigraphs[1] =~ /(network|green|blue|orange|red|ipsec|lq)/) {
|
||||
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
if ($cgigraphs[1] =~ /(green|blue|orange|red|ipsec|lq|cpu|memory|swap|disk|load|fwhits|processes)/) {
|
||||
if ($cgigraphs[1] =~ /(green|blue|orange|red|ipsec|cpu|memory|swap|disk|load|fwhits|processes)/ || $cgigraphs[2] ne "") {
|
||||
my $graph = $cgigraphs[1];
|
||||
my $graphname = ucfirst(lc($cgigraphs[1]));
|
||||
&Header::openbox('100%', 'center', "$graphname $Lang::tr{'graph'}");
|
||||
@@ -96,7 +97,7 @@ if ($cgigraphs[1] =~ /(green|blue|orange|red|ipsec|lq|cpu|memory|swap|disk|load|
|
||||
if ($netsettings{'ORANGE_DEV'}) {
|
||||
push (@graphs, ('ORANGE')); }
|
||||
push (@graphs, ("RED"));
|
||||
push (@graphs, ('lq'));
|
||||
push (@graphs, ('gateway'));
|
||||
|
||||
foreach my $graphname (@graphs) {
|
||||
&Header::openbox('100%', 'center', "$graphname $Lang::tr{'graph'}");
|
||||
@@ -122,7 +123,7 @@ elsif ( $cgigraphs[1] eq "processes" ) { print "<a href='/cgi-bin/services.cgi'>
|
||||
elsif ( $cgigraphs[1] =~ /disk/ ) { print "<a href='/cgi-bin/media.cgi'>"; }
|
||||
elsif ( $cgigraphs[1] =~ /red/ || $cgigraphs[1] =~ /ipsec/ ) { print "<a href='/cgi-bin/network.cgi?network=red'>"; }
|
||||
elsif ( $cgigraphs[1] =~ /green/ || $cgigraphs[1] =~ /blue/ || $cgigraphs[1] =~ /orange/ ) { print "<a href='/cgi-bin/network.cgi?network=internal'>"; }
|
||||
elsif ( $cgigraphs[1] eq "fwhits" || $cgigraphs[1] eq "lq" ) { print "<a href='/cgi-bin/network.cgi?network=other'>"; }
|
||||
elsif ( $cgigraphs[1] eq "fwhits" || $cgigraphs[2] ne "" ) { print "<a href='/cgi-bin/network.cgi?network=other'>"; }
|
||||
print "$Lang::tr{'back'}</a></td></tr></table></div>\n";
|
||||
|
||||
&Header::closebigbox();
|
||||
|
||||
@@ -35,6 +35,7 @@ my %pppsettings=();
|
||||
my %netsettings=();
|
||||
my @cgiparams=();
|
||||
my @graphs=();
|
||||
my @pings=();
|
||||
my $iface='';
|
||||
my %dhcpsettings=();
|
||||
my %dhcpinfo=();
|
||||
@@ -54,7 +55,11 @@ if ($cgiparams[1] =~ /red/) {
|
||||
if (-e "/var/log/rrd/collectd/localhost/interface/if_octets-ipsec0.rrd") {push (@graphs, ("ipsec0"));}
|
||||
}elsif ($cgiparams[1] =~ /other/) {
|
||||
&Header::openpage($Lang::tr{'network traffic graphs others'}, 1, '');
|
||||
push (@graphs, ("lq"));
|
||||
my @pinggraphs = `ls -dA /var/log/rrd/collectd/localhost/ping/*`;
|
||||
foreach (@pinggraphs){
|
||||
$_ =~ /(.*)\/ping\/ping-(.*)\.rrd/;
|
||||
push(@pings,$2);
|
||||
}
|
||||
push (@graphs, ("fwhits"));
|
||||
}else {
|
||||
&Header::openpage($Lang::tr{'network traffic graphs internal'}, 1, '');
|
||||
@@ -67,11 +72,30 @@ if ($cgiparams[1] =~ /red/) {
|
||||
|
||||
&Header::openbigbox('100%', 'left');
|
||||
|
||||
foreach my $graphname (@pings) {
|
||||
|
||||
if ($graphname eq "gateway" )
|
||||
{ &Graphs::updatepinggraph("day","gateway"); }
|
||||
else
|
||||
{ &Graphs::updatepinggraph("day","$graphname"); }
|
||||
|
||||
&Header::openbox('100%', 'center', "$graphname $Lang::tr{'graph'}");
|
||||
if (-e "$Header::graphdir/${graphname}-day.png") {
|
||||
my $ftime = localtime((stat("$Header::graphdir/${graphname}-day.png"))[9]);
|
||||
print "<center><b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br />\n";
|
||||
print "<a href='/cgi-bin/graphs.cgi?graph=$graphname&graph=ping'>";
|
||||
print "<img alt='' src='/graphs/${graphname}-day.png' border='0' />";
|
||||
print "</a>";
|
||||
} else {
|
||||
print $Lang::tr{'no information available'};
|
||||
}
|
||||
print "<br />\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
foreach my $graphname (@graphs) {
|
||||
|
||||
if ($graphname eq "lq" )
|
||||
{ &Graphs::updatelqgraph("day"); }
|
||||
elsif ($graphname eq "fwhits" )
|
||||
if ($graphname eq "fwhits" )
|
||||
{ &Graphs::updatefwhitsgraph("day"); }
|
||||
else
|
||||
{ &Graphs::updateifgraph($graphname, "day"); }
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
include Config
|
||||
|
||||
VER = 3.0.29
|
||||
VER = 3.0.30
|
||||
|
||||
THISAPP = samba-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = samba
|
||||
PAK_VER = 6
|
||||
PAK_VER = 7
|
||||
|
||||
DEPS = "cups cyrus-sasl"
|
||||
|
||||
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = ac338e28f159e59a8d25cb1d0895cf8e
|
||||
$(DL_FILE)_MD5 = d647ec1f34414fa8691f74536dcccfb5
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user