MPFire hinzugefügt - CGI mpg123 Frontend

Hardwaregraphs und Samba korrigiert
makegraphs für alle erweitert die ihr Gateway nicht pingen können -> geht jetzt auf ping.ipfire.org


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@654 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-06-30 20:47:32 +00:00
parent b0c66429c4
commit a28fdc01da
23 changed files with 432 additions and 34 deletions

View File

@@ -379,11 +379,22 @@ sub updatelq {
my $LQ_GATEWAY=`cat /var/ipfire/red/remote-ipaddress`;
chomp($LQ_GATEWAY);
my $NUMPINGS=5;
my $pingoutput = `ping -c $NUMPINGS -q $LQ_GATEWAY`;
chomp;
my $pingoutput = `/usr/bin/ping -w 10 -c $NUMPINGS -q $LQ_GATEWAY | tail -2`;
my @temp = split (/\/|\%|\s/, $pingoutput);
$packetloss = $temp[17];
$roundtrip = $temp[28];
$packetloss = $temp[5];
$roundtrip = $temp[17];
print "Paketlos->".$packetloss."<-Roundtrip->".$roundtrip."<-\n";
if ( $packetloss eq "100" ){
my $pingoutput = `/usr/bin/ping -w 10 -c $NUMPINGS -q ping.ipfire.org | tail -2`;
my @temp = split (/\/|\%|\s/, $pingoutput);
$packetloss = $temp[5];
$roundtrip = $temp[17];
print "Paketlos->".$packetloss."<-Roundtrip->".$roundtrip."<-\n";
}
RRDs::update ("$rrdlog/lq.rrd", "N:$packetloss:$roundtrip");
$ERROR = RRDs::error;
print "Error in RRD::update for line quality: $ERROR\n" if $ERROR;