]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
added data amount to ebdiskfill
authorHades DAQ <hadaq@hades33.gsi.de>
Tue, 2 Jul 2013 14:31:58 +0000 (16:31 +0200)
committerHades DAQ <hadaq@hades33.gsi.de>
Tue, 2 Jul 2013 14:31:58 +0000 (16:31 +0200)
hmon/permanent/hmon_ebdiskfill.pl

index 26a96b5cc23675336c52646f62ab8d1c81e71674..faa083fbebc08ae192a0582d1d0485c990cb8025 100755 (executable)
@@ -10,6 +10,7 @@ use Hmon;
 use QA;
 
 my $store = {};
+my $store2 = {};
 my $laststore = {};
 my $values = {};
 my $color = {};
@@ -26,22 +27,22 @@ $max = 0;
 my $str;
 while (1) {
   $maxqa = 0;
-  $str  = Hmon::MakeTitle(8,3,"Eventbuilder Disk Fill Level"); 
+  $str  = Hmon::MakeTitle(8,5,"Eventbuilder Disk Fill Level"); 
   $str .= "<table class=\"colorfields\">\n<tr><th>";
   for (my $d=1;$d<=22;$d++) {
     $str .= "<th>$d";
   }
-  for (my $n=1;$n<=5;$n++) {
+  for (my $n=1;$n<=7;$n++) {
     my @out = Hmon::qxtimeout("ssh lxhadeb0$n \"df -h \"",10);
     foreach my $a (@out) {
-      if ($a =~ /(\d*)\%\s*\/data(\d\d)/) {
-       $store->{$n}->{$2} = $1;
-       #           print $a."  $1    $2\n";
-       if ($1 > $max) {
-         $max = $1; $maxb = "$1% on lxhadeb$n Disk $2";
+      if ($a =~ /\d+,?.?\d+[TGM]?\s+(\d+,?.?\d+[TGM]?)\s+(\d+,?.?\d+[TGM]?)\s+(\d*)\%\s*\/data(\d\d)/) {
+       $store->{$n}->{$4} = $3;
+       $store2->{$n}->{$4} = $2." / ".$1." = ".$3."%";
+       if ($3 > $max) {
+         $max = $3; $maxb = "$3% on lxhadeb$n Disk $4";
        }
-       if ($1 > $maxqa) {
-         $maxqa = $1;
+       if ($3 > $maxqa) {
+         $maxqa = $3;
        }
       }
     }
@@ -51,7 +52,7 @@ while (1) {
       $id = '0'.$d if $d<10;
       $store->{$n}->{$id} = 0 unless exists $store->{$n}->{$id};
       $str .= "<td ";
-      $str .= sprintf("style=\"background-color:%4s;\">%2i",Hmon::findcolor($store->{$n}->{$id},0,100,0),$store->{$n}->{$id});
+      $str .= sprintf("style=\"background-color:%4s;\" title=\"%s\">%2i",Hmon::findcolor($store->{$n}->{$id},0,100,0),$store2->{$n}->{$id}||"",$store->{$n}->{$id});
     }
 
   }