]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/atm-status.cgi
memory.cgi: Fix memory usage table
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / atm-status.cgi
index 5c0fa8be9482bd20159a04bfd6b70e1ed710d4cb..49f19209d1634ebaf8069e5a749640fb471f8595 100644 (file)
@@ -33,7 +33,7 @@ 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);
 
 &Header::showhttpheaders();
 &Header::openpage($Lang::tr{'status information'}, 1, '');
@@ -46,6 +46,27 @@ foreach (@modems){
        my $lines=0;
        print "<center><table>";
        my $modem=$_;
+       my @pfile = `grep . /sys/class/atm/$modem/parameters/* 2>/dev/null`;
+       foreach (@pfile){
+               chomp($_);
+               my $param= `echo $_ | cut -d'/' -f7 | cut -d':' -f1`;
+               my $value= `cat /sys/class/atm/$modem/parameters/$param`;
+               chomp($param);
+               chomp($value);
+               if (!($param =~"uevent") 
+                 && !($param =~"resource")
+                 && !($param eq "")
+               ) {
+                               
+                       $lines++;
+                       if ($lines % 2){
+                               print "<tr bgcolor='$color{'color22'}'>";
+                       }else{
+                               print "<tr bgcolor='$color{'color20'}'>";
+                       }
+                       print "<td align='left'>$param</td><td align='left'>$value</td> ";              
+               }
+       }
        my @pfile = `grep . /sys/class/atm/$modem/device/* 2>/dev/null`;
        foreach (@pfile){
                chomp($_);
@@ -58,6 +79,8 @@ foreach (@modems){
                  && !($param =~"bInterface")
                  && !($param =~"bAlternateSetting")
                  && !($param =~"bNumEndpoints")
+                 && !($param =~"config matches")
+                 && !($param =~"resource")
                  && !($param eq "")
                ) {