]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update various hmon scripts
authorhadaq <jan@lxhadeb07>
Wed, 18 Oct 2023 14:40:04 +0000 (16:40 +0200)
committerhadaq <jan@lxhadeb07>
Wed, 18 Oct 2023 14:40:04 +0000 (16:40 +0200)
19 files changed:
hmon/QA.pm
hmon/hmon_boxmon.pl [changed mode: 0755->0644]
hmon/hmon_busynew.pl
hmon/hmon_ebsummary.pl
hmon/hmon_ecal_recover_dead_slow_channels.pl
hmon/hmon_endpoints.pl
hmon/hmon_fwrate.pl
hmon/hmon_hodo.pl [changed mode: 0755->0644]
hmon/hmon_logsts.pl [changed mode: 0755->0644]
hmon/hmon_padiwatemp_hodo.pl [changed mode: 0755->0644]
hmon/hmon_padiwatemp_itof.pl [changed mode: 0755->0644]
hmon/hmon_padiwatemp_start.pl [changed mode: 0755->0644]
hmon/index.cgi
hmon/permanent/hmon_cpu.pl
hmon/permanent/hmon_eb_run.pl
hmon/permanent/hmon_ebdiskfill.pl
hmon/permanent/hmon_fwhv.pl
hmon/permanent/hmon_hldlastfiles.pl
hmon/permanent/hmon_logbook.pl

index 7fb8a80d3f031b3b3e2f051c0f8186a029b94f87..d7ca6624aa10f6bf510d95d20f721b49c7df86f4 100644 (file)
@@ -122,7 +122,7 @@ our @TdcCalibrationTemperature = (5,7,10);
 our @PionLvCurrLimits = (4,5,6);
 
 
-our $PadiwaEcalNumber = 105;
+our $PadiwaEcalNumber = 126;
 our @PadiwaEcalLimits    = (3, 5, 8);
 
 our $PadiwaItofNumber = 18;
old mode 100755 (executable)
new mode 100644 (file)
index 3f53115262ccbbef3ff922215932d37698b7b2c7..2ee9274cc3f79e75a50e02d37065366950f99833 100755 (executable)
@@ -25,7 +25,7 @@ $plot->{titles}->[2] = "ECal";
 $plot->{titles}->[3] = "RPC";
 $plot->{titles}->[4] = "Rich";
 $plot->{titles}->[5] = "TOF";
-$plot->{titles}->[6] = "STS";
+#$plot->{titles}->[6] = "STS";
 $plot->{titles}->[7] = "Cts";
 $plot->{titles}->[8] = "Start";
 # $plot->{titles}->[9] = "Pion";
@@ -55,7 +55,7 @@ HPlot::PlotInit({
   entries  => 9,
   ymin     => -1,
   ymax     => 101,
-  bartitle => ["M12","M34","ECa","RPC","Rich","TOF","STS","Cts","St"],
+  bartitle => ["M12","M34","ECa","RPC","Rich","TOF/FW","","Cts","St"],
   buffer   => 1,
   storable => 0,
   bargap   => 5,
@@ -111,7 +111,7 @@ while (1) {
     HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[1],3); #RPC
     HPlot::PlotAdd('BusyTimes',max($diff->{0x8000}->[7],$diff->{0x8000}->[8]),4); #Rich
     HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[2],5); #Tof
-    HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[4],6); #STS
+#    HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[4],6); #STS
     HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[0],7); #Cts
     HPlot::PlotAdd('BusyTimes',$diff->{0x8013}->[8],8); #Start TRB3
 #     HPlot::PlotAdd('BusyTimes',max($diff->{0x8003}->[1],$diff->{0x8003}->[2]),9); #Pion
@@ -123,7 +123,7 @@ while (1) {
     HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[1],3); #RPC
     HPlot::PlotFill('BusyTimeBars',max($diff->{0x8000}->[7],$diff->{0x8000}->[8]),4); #Rich
     HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[2],5); #Tof
-    HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[4],6); #STS
+#    HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[4],6); #STS
     HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[0],7); #Cts
     HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[8],8); #Start TRB3
 #     HPlot::PlotAdd('BusyTimes',max($diff->{0x8003}->[1],$diff->{0x8003}->[2]),9); #Pion
index 8ff6cd7d38335a725e4c85dde8798269b1edf7b3..070403467dd538f794bc704cc7a17ba2dca5ceb8 100755 (executable)
@@ -66,7 +66,7 @@ while(1){
   
   
   
-  my $str  = Hmon::MakeTitle(9, 8, "EB Summary",1);
+  my $str  = Hmon::MakeTitle(9, 10, "EB Summary",1);
   $str .= "<div class=\"flex\">";
   $str .= "<div style='margin:10px;background:#ccc;'>";
   $str .= "<table><col><col style='width:130px;text-align:right;background:white;'> ";
index 2372ecfc49927e2deb20a053b5266e11b71c7e57..5cbd08660032cc6c1fa5d0129d5817f652e7e5e7 100755 (executable)
@@ -39,7 +39,7 @@ my $REGNR = 24; # number of bits to shift for the register number
 
 my $skipped_both_counter=0;
 
-my $rh_tdc_skip_list =  {6011=>1, 6012=>1, 6013=>1, 6014=>1, 6015=>1, 6050=>1, 6051=>1, 6052=>1, 6053=>1, 6054=>1, 6055=>1, 6056=>1  };
+my $rh_tdc_skip_list = {}; # {6011=>1, 6012=>1, 6013=>1, 6014=>1, 6015=>1, 6050=>1, 6051=>1, 6052=>1, 6053=>1, 6054=>1, 6055=>1, 6056=>1  };
 #print Dumper $rh_tdc_skip_list;
 #exit;
 
index db91d00e3dee2ef86479eb831a076a6d25b69409..704f1f1e7dbf94bc014426ff64e4643e1271f0dd 100755 (executable)
@@ -232,7 +232,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
@@ -292,7 +293,8 @@ while(1) {
     my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
        $qastate = max($qastate,QA::ERROR)  if $samechamberboards;
        $qastate = min(QA::WARN,$qastate)   if !$samesectorboards;
-       $qastate = QA::ERROR  if $mdcmissingtime > 360;
+       $qastate = QA::NOTE  if $mdcmissingtime > 360;
+       
        $longtext .= "<br>Few boards missing, but for a long time. Better do a restart." if $mdcmissingtime > 360;
        
     Hmon::Speak('mdcmissonce',"$num_mdc_missing MDC Frontends missing") if($qastate > 60 && $qastate < QA::ERROR );
index 43023e3b37b740ba9437f71f7a7d9f6802fbe1d8..a390f76be6b8a0e3ef5ee9d169fbd95161db846f 100755 (executable)
@@ -56,14 +56,43 @@ HPlot::PlotInit({
     showvalues => 0, 
     });
 
+HPlot::PlotInit ({
+             name       => "FwRateSimple",
+             file       => "files/FwRateSimple",
+             title      => "FW Rate",
+             entries    => 32,
+             curves     => 15,
+             type       => HPlot::TYPE_HEATMAP,
+             output     => HPlot::OUT_PNG,
+             zlabel     => "Hitrate",
+             sizex      => 310,
+             sizey      => 310,
+             nokey      => 1,
+             buffer     => 1,
+             ymin       => 14.5,
+             ymax       => -0.5,
+             xmin       => -0.5,
+             xmax       => 31.5,
+             cbmax      => "100<*<1E8",
+             cbmin      => 0,
+             noinit     => 1,
+             additional => "set logscale cb; unset ytics;set format cb \"_{10}{\%L}\"",
+             showvalues => 0,  });
+
 
 my $str  = Hmon::MakeTitle(9, 13, "FW Hit Rate",0);
 $str .= qq@<img src="%ADDPNG files/FwRates.png%" type="image/png"><br>\n@;
-
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("FwRates",$str);
 
 
+$str  = Hmon::MakeTitle(4, 7, "FW Hit Rate",0);
+$str .= qq@<img src="%ADDPNG files/FwRateSimple.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("FwRateSimple",$str);
+
+
+
 my $old;
 my $oldtime = time();
 my $time = time();
@@ -100,6 +129,9 @@ while(1) {
         
         if ($vdiff < 0) { $vdiff += 2**28;}
         $diff->{$b}->[$v] = $vdiff/$tdiff;
+
+        HPlot::PlotFill('FwRateSimple',$diff->{$b}->[$v],$v,($b%4)+((($b>>4)%4)*5));
+
 #         my $val = $diff->{$b}->[$v];
         
 #         HPlot::PlotFill('FwRate',$diff->{$b}->[$v],$v,$xpos);
@@ -138,7 +170,8 @@ while(1) {
         HPlot::PlotFill('FwRate',$val,$x[$i]+3,43-$y[$i]-3);
         }      
       }      
-    HPlot::PlotDraw('FwRate');    
+    HPlot::PlotDrawFork('FwRate');    
+    HPlot::PlotDrawFork('FwRateSimple');    
 
    }
 # print $highrate." ".$lowrate."\n";
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index b0bca6d1e47490ebce27d57a7c13b5caf4ce4dc4..cadc0fe94a047950f7417fbd898192cf01ce08f5 100755 (executable)
@@ -53,7 +53,8 @@ function openwin(url) {
 <li style="width:600px;"><a href="monitor.cgi?1-window9x21-busyhist-eventratelong-eventrateshort-StartBars">Main Screen 1</a> Eventrate & Busy
 <li style="width:600px;"><a href="monitor.cgi?1-window8x26-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a> Spill Info
 <li style="width:600px;"><a href="monitor.cgi?1-window14x8-EBSummary-hldlast">Main Screen 3</a> EBs</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window19x16-EcalSimpleRate-RpcRate-StsRate-TofRate-ItofRate-StartRateSimple-FrpcRate">Main Screen 4</a> Tof Rpc STS Ecal iTOF fRPC Start rates</li>
+<!--<li style="width:600px;"><a href="monitor.cgi?2-window19x16-EcalSimpleRate-RpcRate-StsRate-TofRate-ItofRate-StartRateSimple-FrpcRate">Main Screen 4</a> Tof Rpc STS Ecal iTOF fRPC Start rates</li>-->
+<li style="width:600px;"><a href="monitor.cgi?2-window26x9-EcalSimpleRate-RpcRate-TofRate-StartRateSimple-FwRateSimple">Main Screen 4</a> Tof Rpc FW Ecal Start rates</li>
 <li style="width:600px;"><a href="monitor.cgi?2-window13x23-StartFalls-ItofRateNumbers-TriggerRatesPerSector-CTSRates">Main Screen 5</a> Positional map for Start and iTOF, Trigger Rates</li>
 <li class="outdated" style="width:600px;"><a href="monitor.cgi?2-window12x21-RpcTofSectorRate_highres-StartRateX_histbar-StartRateY_histbar">Main Screen 6</a> Beam Intensities</li>
 </ul></div>
index b8f948d59002b5ce34aced3ee6bf7483f712993d..c907580d236fbf527bfac51eef9986f7f75e604d 100755 (executable)
@@ -32,7 +32,7 @@ my $fqa = QA::OpenQAFile();
 
 # JAM 6.1.2020 - for the moment exlude hosts depcp418 and lxhaddcs03 not available
 # MT 2022.02.09 - all to internal HADES-VLAN CPU-names
-my @srv = qw( lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb14p lxhadeb15p lxhadeb16p lxhadesdaqp  lxhadeb07p lxhadeb13p hadesdaqp03 hadesdaqp04 hadesp30 hadesp57 hadesp31 hadesp33 hadesp63 hadesp66 hadesp70 lxhaddcs05p lxhaddcs06p lxhaddcs10p lxhaddcs11p lxhaddcs12p lxhaddcs13p);
+my @srv = qw( lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb14p lxhadeb15p lxhadeb16p lxhadeb17p lxhadeb18p lxhadesdaqp  lxhadeb13p lxhaddcs10p lxhaddcs11p lxhaddcs12p lxhaddcs13p hadesdaqp03 hadesdaqp04 hadesp30 hadesp57 hadesp31 hadesp33 hadesp63 hadesp66 hadesp70);
 
 my $template .= "\n<table class=\"colorfields cpu\">\n<tr><th>";
 for(my $d=1;$d<=32;$d++) {
@@ -70,7 +70,7 @@ while(1) {
   my $maxstr = "";
   my $busystr = "";
   if (defined $laststore->{0}->{0}->{'idle'}) {
-    $str = Hmon::MakeTitle(9,16,"Server CPU Usage");
+    $str = Hmon::MakeTitle(9,14,"Server CPU Usage");
     $str .= $template;
     for(my $s = 0; $s < scalar @srv; $s++) {
       $str .= "\n<tr><th class=\"title\">$srv[$s]";
index fd6484fa521c7e09cb033afca4d4b629a2f37462..9a5be6bbd0398ff45a58506f5d2b23e76d4c34f2 100755 (executable)
@@ -63,8 +63,9 @@ my $url_prefix =    $masterurl . 'Master/BNET/RunPrefix/get.json?field="value"';
 my $url_builders =  $masterurl . 'Master/BNET/Builders/get.json?field="value"';
 my $url_inputs =    $masterurl . 'Master/BNET/Inputs/get.json?field="value"';
 
-#JAM2021 - location of 8800 changed to input 7
-my $url_cts_histo = $masterurl . '/BNET-IN-7/TRB8800_TdcCal/TRB_8800/TRB_8800_TrigType/get.json?field="bins"';
+#JAM2023 - location of 8800 changed to input 4
+my $url_cts_histo = $masterurl . '/BNET-IN-4/TRB8800_TdcCal/TRB_8800/TRB_8800_TrigType/get.json?field="bins"';
+
 
 my $url_master_state = $masterurl . 'Master/BNET/State/get.json?field="value"';
 
index e765c25fd9877cd612f9fc3349e737c1dfe6584b..69f6d612ee8ea8bc6150c309204db9ca153b7c59 100755 (executable)
@@ -32,7 +32,8 @@ while (1) {
   for (my $d=1;$d<=15;$d++) {
     $str .= "<th>$d";
   }
-  for (my $n=8;$n<=16;$n++) {
+  for (my $n=8;$n<=18;$n++) {
+    next if $n==13;
     my $hostn=sprintf("lxhadeb%02d", $n); 
     my @out = Hmon::qxtimeout("ssh $hostn \"df -h \"",10);
     foreach my $a (@out) {
index 8bdcf140302e57259301b3f27814433fe4595740..a1531a955285b4790a0533f40e40fcc2775eaac5 100755 (executable)
@@ -44,8 +44,8 @@ HPlot::PlotInit({
     ymax    => 43.5,
     xmin    => -0.5,
     xmax    => 43.5,
-    #cbmax   => 1600,
-    cbmin   => 0,
+    cbmax   => 1800,
+    cbmin   => -1,
     noinit  => 1,
 #     additional => "set logscale cb;unset ytics;set format cb \"_{10}{\%L}\"",
     additional => "
@@ -53,7 +53,7 @@ HPlot::PlotInit({
       set obj 2 rect from   15.4, 15.5 to  27.5, 27.5 lw 0.2 fs empty border -1 front \n
       unset ytics \n
       unset xtics \n
-      set palette defined ( -1 \"#000000\", 0 \"#0000ff\", 990 \"#00aaff\", 991 \"#00ff00\", 1400 \"#ffff00\", 1800 \"#ff0000\" ) \n
+      set palette defined ( -1 \"#000000\", -0.1 \"#0000ff\", 990 \"#00aaff\", 991 \"#00ff00\", 1400 \"#ffff00\", 1800 \"#ff0000\" ) \n
       ",
     showvalues => 0, 
     });
@@ -130,7 +130,7 @@ while(1) {
       $ChnlsOld++;
       }
     } 
-  
+
 
   my $qastate = QA::OK;
   my $value = sprintf("%i/%i",$ChnlsOn, scalar @channels);
@@ -156,10 +156,9 @@ while(1) {
     next if ($i == 218 || $i == 219 || $i == 220 || $i == 230);
     next if ($i == 283 || $i == 293 || $i == 294 || $i == 295);  
     my $val = $data->{$i}->{val};
-    $val = -1 if $time > ($data->{$i}{tme}//0)+600;
-
-    #     $val = $i; #TODO
-    
+#print($time."\t".$data->{$i}{tme}."\t".(($data->{$i}{tme}//0)+600)."\t$val\t");
+    $val = -1 if $time > (($data->{$i}{tme}//0)+600);
+#    print ($val."\n");
     HPlot::PlotFill('FwHV',$val,$x[$i],  43-$y[$i]);
     if($i>=145) {
       HPlot::PlotFill('FwHV',$val,$x[$i]+1,43-$y[$i]);
index b52e537c06a632ad0c159f0ac4efd4a57eb15e9e..aae1c396586b71a9a1eb8b726a49818517031e09 100755 (executable)
@@ -13,7 +13,7 @@ use QA;
 while(1) {
   my $out  = Hmon::MakeTitle(4,8,"Last *.hld files"); 
   $out .= "<pre style='text-align:left;font-size:10px;'> ";
-  foreach my $i (8,9,14,15,16) {
+  foreach my $i (8,9,10,11) {
     my $server = sprintf("lxhadeb%02i",$i);
     $out .= "<b>$server</b>\n";
     my $cmd = "ssh $server \"ls -rtlh /data*/data/*.hld | tail -n4\"";
index 35abd9f6994bfc53a23feefeeb5b1eb4b0dce2e9..fe5d70a9ba43cb7134957567d4c764034cf74792 100755 (executable)
@@ -13,7 +13,7 @@ use JSON;
 
 
 my $firstrun =1; 
-my $command = "curl 'https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.show' -b /tmp/cookiefile -c /tmp/cookiefile -X POST -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' -H 'Accept-Language: de,en-US;q=0.7,en;q=0.3' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://hades-db.gsi.de' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: iframe' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' --data-raw 'p_exp_id=MAY22TEST&p_begin=&p_end=&p_num_days=&p_num_entries=5&p_author=&p_action=Show&p_log_type=All&p_run_type=None&p_current=&p_filename=*&p_search_text=*'  -u hades:6\\\$ectors   2>/dev/null | iconv -f ISO-8859-1 -t UTF-8";
+my $command = "curl 'https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.show' -b /tmp/cookiefile -c /tmp/cookiefile -X POST -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' -H 'Accept-Language: de,en-US;q=0.7,en;q=0.3' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://hades-db.gsi.de' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: iframe' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' --data-raw 'p_exp_id=FEB24&p_begin=&p_end=&p_num_days=&p_num_entries=5&p_author=&p_action=Show&p_log_type=All&p_run_type=None&p_current=&p_filename=*&p_search_text=*'  -u hades:6\\\$ectors   2>/dev/null | iconv -f ISO-8859-1 -t UTF-8";
 
 my $store;
 my $hash;