]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update hmon scripts
authorhadaq <jan@lxhadeb07>
Wed, 16 Apr 2025 12:34:15 +0000 (14:34 +0200)
committerhadaq <jan@lxhadeb07>
Wed, 16 Apr 2025 12:34:15 +0000 (14:34 +0200)
hmon/QA.pm
hmon/hmon_checkrebooted.pl
hmon/hmon_eberrbits_withreset.pl
hmon/hmon_endpoints.pl
hmon/hmon_mdcnew_temp_1wire.pl
hmon/hmon_sfp.pl [changed mode: 0644->0755]
hmon/permanent/hmon_fwhv.pl
hmon/permanent/hmon_mdcpressure.pl
hmon/permanent/hmon_trbnet.pl

index a4257c6ed3bc7a8bc20e0e2c7cb3b1172e8d0f84..5c0547ba70a4513a948ea546220c23e0183db805 100644 (file)
@@ -52,7 +52,7 @@ $entries->{'rate'}    = ['pt1','pt2','pt3','pt8','veto'];
 $entries->{'server'}  = ['fill', 'cpu', '', 'ebinputs', 'onlineqa']; #icinga, pwrsup
 $entries->{'eb'}      = ['run', 'rate','bytes', 'lostevt', 'errbits'];
 $entries->{'mdc'}     = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
-$entries->{'endp'}    = ['mdc','mdc12','rich', 'tof', 'other'];  #'rpc', 
+$entries->{'endp'}    = ['mdc12','mdc','rich', 'tof', 'other'];  #'rpc', 
 $entries->{'feeerr'}  = ['feeerr','trginp','trgqual','rpc','tof'];
 $entries->{'rich'}    = ['temp','LV','bkpl','isob','richthr'];
 #$entries->{'padiwa'}  = ['ecal','start','sts','itof','hodo'];
@@ -169,7 +169,7 @@ our $QAServerOff = 0;
 ###############################################################################
 
 our @mdc_boards_removed =(0x2257); # 2333 added 2024-03-01 #(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
-our @mdc_new_boards_removed =(0x8e95,0xa950,0xa951);
+our @mdc_new_boards_removed =(); #(0x8e95,0xa950,0xa951);
 
 our @mdc_chambers_removed =();
 our @rich_boards_removed =();#(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a);
index d07249aaaf66e29f4a9d6ed3417ff75a202cc1f4..359d53e43e399174245f5ac118700c4b0a8ce3a5 100755 (executable)
@@ -30,19 +30,22 @@ while(1) {
   my $wrongtimeboards="";
  
   my $boards = trb_register_read(0xffff,0x40);
-  foreach my $board ( keys %$boards ) {
+  foreach my $board (sort keys %$boards ) {
     next if $board == 0xfc00;
     if ($board >= 0xf000) {
       $noaddrboards .= sprintf("%04x (%s), ",$board,Hmon::getsystem($board));
       }
-    if ($board >= 0xa000 && $board <= 0xbfff && $boards->{$board} < 0x65000000) {
+    if ($board >= 0xa000 && $board <= 0xbfff && $boards->{$board} < 0x67d00000) {
+      $wrongtimeboards .= sprintf("%04x (%s), ",$board,Hmon::getsystem($board));
+      }
+    if ($board >= 0x8e00 && $board <= 0x8fff && $boards->{$board} < 0x67a80000) {
       $wrongtimeboards .= sprintf("%04x (%s), ",$board,Hmon::getsystem($board));
       }
     }
 
   my $qastate = QA::OK;
   my $status = "";
-  my $longmsg = "No wrong compile times or addresses found";
+  my $longmsg = "";
   if ($noaddrboards ne "" || $wrongtimeboards ne "") {
     chop $noaddrboards; chop $noaddrboards;
     chop $wrongtimeboards; chop $wrongtimeboards;
@@ -51,6 +54,8 @@ while(1) {
     $longmsg .= "Boards without valid addresses: $noaddrboards<br>" if $noaddrboards ne "";
     $longmsg .= "Boards with wrong compile time: $wrongtimeboards" if $wrongtimeboards ne "";
     }
+  $longmsg = "No wrong compile times or addresses found" if $longmsg eq "";
+
   QA::WriteQALog($fqa, "misc2", "boards", 30, $qastate,"Boards", $status,$longmsg);    
 
   system("logger -p local1.info -t DAQ Boards \\<E\\> $longmsg") if $qastate != QA::OK && $timer == 0;
index 4e709e19febadd296aa382de2c0ce4c2faaac86f..42ceaa45ea6931bb52b2887a027a7c8ebf678621 100755 (executable)
@@ -209,13 +209,16 @@ print Dumper $store if $opt_verbose;
 
 # JAM2018 - same as before with epics:
 foreach my $k (sort keys %$store) {
-    next if $k eq "TRB_83C2"; #################################################################because of trigger input error
+    #next if $k eq "TRB_83C2"; #################################################################because of trigger input error
     if ($k ne "all") {
       foreach my $b (sort keys %{$store->{$k}}) {
         if(($b != 0)) {
           my $perc = $store->{$k}->{$b}/($store->{$k}->{0} || $store->{$k}->{$b} || 1)*100;
-          $maxperc = $perc if $perc > $maxperc;
-          $sumperc += $perc;
+          if(!($k =~ "TRB_85")) {
+            $maxperc = $perc if $perc > $maxperc;
+            $sumperc += $perc;
+            $brokenevents += $store->{$k}->{$b};
+            };
           my $ts = sprintf("%s has %i events (%.2f%%) with %s - ",
                                             $sources->{$k},
                                        # substr ($sources->{$k}, 1, -1),
@@ -223,7 +226,6 @@ foreach my $k (sort keys %$store) {
                                          $perc,
                                          $bits[$b]);
           $longstring .= $ts."<br>";          
-          $brokenevents += $store->{$k}->{$b};
           }
         } 
       }
index 70304c6975fafa61196eaaffabc9a5d7fb2252b0..b0f1d1a8d51c7475842c13b7a74bf8e7d25f38cc 100755 (executable)
@@ -244,8 +244,8 @@ while(1) {
 #      0x8900,0x3800,0x3801,
 #      0x8910,0x3810,0x3811,
        #Start TRB3sc
-#      0x8880,
-#      0x5000,0x5001,0x5002,0x5003,0x5004, #0x5005,0x5006,0x5007,
+       0x8880,
+       0x5000,0x5001,0x5002,0x5003,0x5004, #0x5005,0x5006,0x5007,
        #Hodo TRB3
 #      0x8890,0x5010,0x5011, #0x5012,
        #Trigger
index 92533a3b7eb0f14300020b3e1b61fbd174279ae4..dacc1b3a94eccc2881ba9c8c9721fd5591b29300 100755 (executable)
@@ -11,12 +11,24 @@ use lib '.';
 use MDC;
 use Time::HiRes qw(usleep time);
 use List::Util qw[min max];
+use Perl2Epics;
 
 use HADES::TrbNet;
 
 #$ENV{DAQOPSERVER} = 'localhost:40';
 trb_init_ports() or die trb_strerror();
 
+foreach my $p (0..3) {
+  foreach my $s (0..5) {
+    foreach my $t (0..4) {
+      Perl2Epics::Connect("Temp-P$p-S$s-M$t","HAD:MDC:P".($p+1).":S".($s+1).":M".($t+1).":temp");
+      }
+    }
+  }
+my $data = Perl2Epics::GetAll();
+
+print "Connected\n";
+
 
 HPlot::PlotInit({
   name    => "MDCNew1wire",
@@ -38,7 +50,7 @@ HPlot::PlotInit({
   #cbmax   => "100<*<1E7",
   #cbmin   => 0,
   noinit  => 1,
-  additional => "set format y \"%02o\";set ytics (0,5,8,13,16,21,24,29);set xtics('IS' 0,'OS' 1, 'IL' 2,'OL' 3,'IC' 4);",
+  additional => "set format y \"%02o\";set ytics (0,5,8,13,16,21,24,29);set xtics('InShort' 0,'InLong' 1, 'OutShort' 2,'OutLong' 3,'InCent' 4);",
   showvalues => 1,  }
   );
 
@@ -80,13 +92,16 @@ while (1) {
         if($store->{$sensors->[$p][$s][$t]}) {
           my $v = $store->{$sensors->[$p][$s][$t]};
           HPlot::PlotFill('MDCNew1wire',$v,$t,$p*8+$s);
+          
+          Perl2Epics::Put("Temp-P$p-S$s-M$t",$v)
+    
           }
         }
       }
     }
       
   HPlot::PlotDraw('MDCNew1wire');
-
+  Perl2Epics::Update(1);
 # print Dumper $store;
 # last;
   sleep 31;
old mode 100644 (file)
new mode 100755 (executable)
index 2b3ef2b6c11d4862aa51557e2f2266e1cd1cd036..b10845ef3728e6810b034835c2faeff793ddfac7 100755 (executable)
@@ -39,7 +39,7 @@ HPlot::PlotInit({
     sizex   => 710,
     sizey   => 610,
     nokey   => 1,
-    buffer  => 1,
+    buffer  => 0,
     ymin    => -0.5,
     ymax    => 43.5,
     xmin    => -0.5,
@@ -70,7 +70,7 @@ HPlot::PlotInit({
     sizex   => 710,
     sizey   => 610,
     nokey   => 1,
-    buffer  => 1,
+    buffer  => 0,
     ymin    => -0.5,
     ymax    => 43.5,
     xmin    => -0.5,
index 31f9e58e5159d7d842f52d1e967cfef7c19945bb..4a04f41037b8426d06c6bf24e56f170d93981666 100755 (executable)
@@ -406,14 +406,14 @@ while(1) {
   my $qastat = QA::OK;
   my $msg = "";
   my $longmsg = "";
-  if($vallow < 20 || $vallow > 110){
+  if($vallow > 110){ #$vallow < 20 ||
     $qastat = QA::ERROR;
     $msg .= "VacLow LOLO </br>" if $vallow < 30;
     $msg .= "VacLow HIHI </br>" if $vallow > 110;
     $longmsg .= "VacLow LOLO </br>" if $vallow < 30;
     $longmsg .= "VacLow HIHI </br>" if $vallow > 110;
   }
-  if($qastat != QA::ERROR && ($vallow < 25 || $vallow > 80)){
+  if($qastat != QA::ERROR && ($vallow > 80)){ #$vallow < 30 ||
     $qastat = QA::WARN;
     $msg .= "VacLow LO </br>" if $vallow < 50;
     $msg .= "VacLow HI </br>" if $vallow > 90;
@@ -433,7 +433,7 @@ while(1) {
   if($qastat == QA::OK) {
     $msg = sprintf("%s / %s",QA::SciNotation($vallow),QA::SciNotation2($valhigh));
   }
-  $longmsg .= sprintf("low vacuum: 20 mbar << 25 mbar < <b>%s mbar</b> < 80 mbar << 110 mbar </br>",QA::SciNotation($vallow));
+  $longmsg .= sprintf("low vacuum:  <b>%s mbar</b> < 80 mbar << 110 mbar </br>",QA::SciNotation($vallow));
   $longmsg .= sprintf("high vacuum: <b>%s mbar</b> < 60&times;10<sup>-6</sup> mbar << 150&times;10<sup>-6</sup> mbar </br>",QA::SciNotation2($valhigh));
 
   if($H2_run) {  
index beba1039742e75492d315205eb2bdccac39186b9..c278102a2bf0b8d85c107e2b013c3409ffd790ab 100755 (executable)
@@ -27,7 +27,7 @@ while(1) {
     
   foreach my $s (@out) {
     chomp $s;
-#      print $s."\n";
+       print $s."\n";
     if ($s =~ /0x(\w{4})\s+0x(\w{8})/ && $status eq "N/A") {
       $status = "OK";
       $qastate = QA::OK;
@@ -58,7 +58,7 @@ while(1) {
                }
         Hmon::Speak('trbnet',"TRB Network Error") if $qastate > 60; 
        QA::WriteQALog($fqa,"daq","trbnet",3,$qastate,"TrbNet",$status,$msg);
-#      print $status;
+       print $status;
        if($lastqastate != $qastate) {
          $msg =~ s/'//g;
     system("logger -p local1.info -t DAQ 'Trbnet \<E\> $msg '") if $qastate == QA::FATAL;