Changeset 141

Show
Ignore:
Timestamp:
11/25/10 17:38:14 (12 years ago)
Author:
andreu
Message:

Matrix in bytes in datamining section

Location:
trunk/web
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/web/data/datamatgraph.php

    r140 r141  
    4343            $name2 = $CONFrouter_name[$pop_split[1]]; 
    4444            if ($IDR_hash[$POP1] == 1 && $IDR_hash[$POP2] == 1) { 
    45               $pngname = "img_monotoring/".$POP1."_".$POP2.".png"; 
     45              $pngname = "img_monitoring/".$POP1."_".$POP2.".png"; 
    4646              $rrdname = "$dir/$name"; 
    4747              $samp = 10; 
  • trunk/web/data/datamatrix.php

    r123 r141  
    8383print "$MATRIX_TABLE_INBUILT"; 
    8484 
     85 
     86print "<p> The matrix in quantity of bytes: <br>"; 
     87print "Quantity (in TeraBytes) since last 31 days. </p>\n"; 
     88$MATRIX_TABLE_INBUILT = ""; 
     89$MATRIX_TABLE_INBUILT.= "<table class=\"fields\">\n"; 
     90$MATRIX_TABLE_INBUILT.= "<tr> <th> </th>\n"; 
     91foreach ($IDR_hash as $keyIDR => $valueIDR) { 
     92  if ($keyIDR) { 
     93    $MATRIX_TABLE_INBUILT.= " <th>_$keyIDR _</th>\n"; 
     94  } 
     95} 
     96$MATRIX_TABLE_INBUILT.= "</tr>\n"; 
     97 
     98$IDR_hash2 = $IDR_hash; 
     99foreach ($IDR_hash as $keyIDR => $valueIDR) { 
     100  if ($keyIDR) { 
     101    $MATRIX_TABLE_INBUILT.= " <tr>  <th>_$keyIDR _</th> "; 
     102    foreach ($IDR_hash2 as $keyIDR2 => $valueIDR2) { 
     103      ## get rrd file value 
     104      if ($keyIDR2) { 
     105                                $rrdfilename = $rrdmatrixpath.$CONF_MATRIX_RRD_LOCATION.$keyIDR."_".$keyIDR2.".rrd"; 
     106 
     107##                      $res = `rrdtool fetch $rrdfilename -s -600 AVERAGE | grep -v nan | grep ":" `; 
     108##                      $ressplit = split(" ", $res); 
     109                        ## FIXME *10 
     110##                              $bytes = number_format($ressplit[2]*10*8/300/1000000,0," "," "); 
     111 
     112                                $samp = 10; 
     113                                $myres = `rrdtool graph img_monitoring/toto.png -s -31D -A DEF:BytesG=$rrdfilename:Bytes:AVERAGE CDEF:input10=BytesG,8,*,5,/,60,/,$samp,* CDEF:BytesSec=BytesG,300,/,$samp,* VDEF:TOTIN=BytesSec,TOTAL AREA:input10\#8FA3AD:"b" PRINT:TOTIN:";%1lg" | grep ";" `; 
     114                                $ressplit=split(";",$myres); 
     115                                $bytes=number_format($ressplit[1]/1000000000000,0," "," "); 
     116 
     117          $MATRIX_TABLE_INBUILT.= " <td> "; 
     118        if ($keyIDR2 == $keyIDR) { 
     119          $MATRIX_TABLE_INBUILT.= " - "; 
     120        } else { 
     121          $MATRIX_TABLE_INBUILT.= "  <div id=\"tipbox\"> \n"; 
     122          $MATRIX_TABLE_INBUILT.= "<a href=\"\"> $bytes </a>\n"; 
     123          $MATRIX_TABLE_INBUILT.= "<div>\n"; 
     124          $tmp2 = $CONFrouter_name[$keyIDR]; 
     125          $tmp3 = $CONFrouter_name[$keyIDR2]; 
     126          $MATRIX_TABLE_INBUILT.= " $tmp2 -> $tmp3 "; 
     127          $MATRIX_TABLE_INBUILT.= "</div>\n"; 
     128          $MATRIX_TABLE_INBUILT.= "</div>\n"; 
     129        } 
     130          $MATRIX_TABLE_INBUILT.= "</td> "; 
     131      } 
     132    } 
     133    $MATRIX_TABLE_INBUILT.= " </tr> \n"; 
     134  } 
     135} 
     136$MATRIX_TABLE_INBUILT.= "</table>\n"; 
     137 
     138print "$MATRIX_TABLE_INBUILT"; 
     139 
    85140print "</div>\n"; 
    86141 
  • trunk/web/inf/thks.php

    r136 r141  
    44print "<ul>"; 
    55print "<li> CERT RENATER (for his daily usage of renetcolGUI)</li>"; 
    6 print "<li> Anthony Fisson (syslog section)</li>"; 
     6print "<li> Anthony Fisson (for the syslog section and many discussions about parallel computing options)</li>"; 
    77print "</ul>"; 
    88print "</p> </div>\n";