]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
update hmon scripts
authorhadaq <jan@lxhadeb07>
Wed, 23 Feb 2022 12:16:16 +0000 (13:16 +0100)
committerhadaq <jan@lxhadeb07>
Wed, 23 Feb 2022 12:16:16 +0000 (13:16 +0100)
30 files changed:
hmon/QA.pm
hmon/doc/daq-outofsync.htt
hmon/doc/eb-errbits.htt
hmon/doc/endp-mdc.htt
hmon/doc/endp-rich.htt
hmon/doc/hv2-itofhv.htt
hmon/doc/hv2-valve.htt [new file with mode: 0644]
hmon/doc/misc-seu.htt
hmon/doc/trg-source.htt
hmon/hmon_beamabortbox.pl
hmon/hmon_boxmon.pl
hmon/hmon_endpoints.pl
hmon/hmon_itofrate.pl
hmon/hmon_seu.pl
hmon/hmon_startrate.pl
hmon/hmon_triggerratio.pl
hmon/hmon_waterfall.pl [new file with mode: 0755]
hmon/index.cgi
hmon/monitor.cgi
hmon/permanent/hmon_beamabort.pl
hmon/permanent/hmon_cpu.pl
hmon/permanent/hmon_eb_run.pl
hmon/permanent/hmon_hldlastfiles.pl
hmon/permanent/hmon_itofhv.pl
hmon/permanent/hmon_logfile.pl
hmon/permanent/hmon_open_ssh_master_channels.pl
hmon/permanent/hmon_richIsobutan.pl
hmon/permanent/hmon_spillmon.pl
hmon/start.sh
hmon/styles.css

index 358b47d3f8d990124255b15586c8a65297f592e3..1ab3667bcb6cc03a42c34d1afcefc02a1c901190 100644 (file)
@@ -81,7 +81,7 @@ our $QAServer = "hades33";
 
 our @FeeErrLimits     = (0, 5, 10);
 our @MdcOepLimits     = (372, 372-1, 372-3);
-our @MdcVoltageLimits = (60, 90, 100);
+our @MdcVoltageLimits = (70, 90, 100);
 our @MdcLockLimits    = (0, 3, 5);
 our @MdcTempLimits    = (75, 80, 85);
 our @EcalTempLimits    = (55, 60, 65);
@@ -91,7 +91,7 @@ our @RichInnerTempLimits = (34.3,35.2,36);
 our @TrgErrLimits     = (100, 1000, 10000);
 our @CPULimits        = (95, 100, 100);
 our @TimeoutLimits    = (0, 0, 1);
-our @TimeoutLimitsOnlyRICHMDC = (0, 5, 10);
+our @TimeoutLimitsOnlyRICHMDC = (1, 5, 10);
 our @LinkErrLimits     = (50, 500, 1000);
 our @MdcEndpMissingLimits   =  (0, 5, 8);  #!!! Oh dear.
 our @RichEndpMissingLimits   = (0, 3, 4);
@@ -129,7 +129,7 @@ our $PadiwaItofNumber = 18;
 our @PadiwaItofLimits    = (0, 0, 0);
 
 our $PadiwaStartNumber = 12;
-our @PadiwaStartLimits    = (0, 0, 0);
+our @PadiwaStartLimits    = (0, 1, 1);
 
 our $PadiwaHodoNumber = 2;
 our @PadiwaHodoLimits    = (0, 0, 0);
@@ -162,9 +162,9 @@ our $QAServerOff = 0;
 
 our @mdc_boards_removed =(0x2203, 0x2027, 0x2057); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23
 our @mdc_chambers_removed =();
-our @rich_boards_removed =();
+our @rich_boards_removed =(0x71a4,0x71a5,0x71b4,0x71b5,0x72a4,0x72a5,0x72b4,0x72b5,0x73a4,0x73a5,0x73b4,0x73b5,0x826a);
 our @tof_boards_removed =();
-our @rpc_boards_removed =(); #(0x6010, 0x6011, 0x6012, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6035, 0x6036, 0x6051, 0x6052, 0x6053, 0x6054, 0x6055, 0x6056, 0x8a00, 0x8a05);
+our @rpc_boards_removed =();
 our @other_boards_removed =();
 
 
index 3a1fc80668f8c54320208455fd5ffa3d7b9507b4..96f1a451bc4cde2777c35844db22873d4a9a322b 100644 (file)
@@ -6,7 +6,7 @@ Checks which boards are out of sync with the rest of the boards
 
 <ul>
 <li>Check the list of board addresses, which board is busy. 
-<ul><li>If all addresses start with '2' (from MDC), try "Resync missing OEPs"
+<ul><!--<li>If all addresses start with '2' (from MDC), try "Resync missing OEPs"-->
 <li>If all addresses start with '7' (from RICH), try "Resync DiRich"
 </ul>
 <li>Do a DAQ restart
index c89f1dca6a253b664ba9976ac4ed52a04e066539..470389c52c553a347586704776565cbefebed391 100644 (file)
@@ -5,7 +5,7 @@ The number of accepted events (written to disk) with errors reported by the fron
 Check the long error message for the subsystems that cause the most errors, then try to solve these.
 
 <br><b>Partially Missing</b> errors usually refer to a detector with a lot of noise, try to reload thresholds for the corresponding detector. A few errors of this type are perfectly normal.
-<br><b>EventNumberMismatch TriggerCodeMismatch</b> errors are usually a problem in the hubs - if a DAQ restart doesn't help, try a reboot of the corresponding hubs (in RICH: combiners, or hubs).
+<br><b>EventNumberMismatch TriggerCodeMismatch</b> errors are usually a problem in the hubs - if a DAQ restart doesn't help, try a reboot of the corresponding system, then of its hubs (in RICH: combiners, or hubs).
 <br><b>TimingTriggerError</b> A board has problems receiving the reference time for the event. Check the "Trigger" box for more details.
 <br>If the reason is unclear, try to do a DAQ restart 
 <br>In some cases a reload or power-cycle of the corresponding system / chamber is necessary.
index c31b34868defaa95b3f7edebc4fafaf1501ee237..da4e0d4bd209b096d7e0f63097e7eeee1350faa1 100644 (file)
@@ -1,14 +1,15 @@
 <h3>MDC Endpoints</h3>
 
 This button shows if all MDC front-end modules are active. The button is red if too many modules are 
-missing.<br>
+missing or two boards in the same chamber are missing or few boards are missing for a long time.<br>
 
 
 <h4>Error Handling</h4>
-<ul><li>First thing to try: "Resync OEP" (not if >4 boards are missing).
-<li>If this doesn't help, do a DAQ restart. 
-<li>If a board shows an error directly after DAQ restart several times, do a power-cycle of the corresponding sector
+<ul>
+<li>Do a DAQ restart. 
+<li>If the same board shows an error after DAQ restart several times, do a power-cycle of the corresponding sector
 <li>If this doesn't help, use "Reboot MdcHub" plus 2 DAQ restarts.
+<li>If the missing boards include a hub (0x1___) and a restart doesn't help, a power cycle of MDC Hubs might be needed.
 <li>If 14/16 boards show an error after a power-cycle, click "MDC LV Turn On ALL Relais". You can 
 check the status of relais <a href="/mon/monitor.cgi?1-window-MDCLV">here</a>.
 </ul>
index 3bb6dad0d5282176ae464473000595fe2925684c..05b79c096f391fa8b1c96e88f167f65ef8939e48 100644 (file)
@@ -11,5 +11,5 @@ modules are missing.
 <li>Do another DAQ restart 
 <li>If this doesn't help, use "Reboot DiRich", "Reboot Rich Combiner" and a DAQ restart
 <li>If many boards are missing (>100), check RICH power supplies
-<li>If a hub board (with 8xxx address) is missing as well and a DAQ restart does not help, consider a RICH power cycle
+<li>If a hub board (with 82xx address) is missing as well and a DAQ restart does not help, do a RICH power cycle
 </ul>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5bf7d711f875dcc4c62516b0004e49c6c1d3ef63 100644 (file)
@@ -0,0 +1,4 @@
+<h3>iTOF HV</h3>
+Monitoring for the HV of iTOF SiPMs.
+<br>Orange if current is too high, inform iTOF operator.
+<br>Red if voltage is not correct, inform iTOF operator and check if all trigger rates are fine.
diff --git a/hmon/doc/hv2-valve.htt b/hmon/doc/hv2-valve.htt
new file mode 100644 (file)
index 0000000..e69de29
index 7edc8a321807716db41b3dce7632c00fe3e2284b..71d4b69ad5caf512dc616d7160d368138419ca94 100644 (file)
@@ -10,3 +10,5 @@ front-ends (the most exposed systems!) can be included here.
 The full message contains the addresses of affected boards - consider rebooting the
 coresponding subsystem at your convenience. Doing so before an actual failure of
 the board is always simpler and quicker.
+
+<br>If many RICH Combiner boards show up, do a reboot RICH and reboot RICH combiners before the next DAQ restart.
index 35983fb09acb46fa24d5265c8b23cbc5be5e8438..2a053d844407a46471f9e9a3e8aa8f176fec19d9 100644 (file)
@@ -11,6 +11,7 @@ This button displays the used Trigger source.
 <h4>Error Handling</h4> 
 <ul>
 <li>Restart DAQ to make sure all settings are loaded correctly
+<li>Run BLR Reinit FPGA to reload the analog trigger collection board
 </ul>
 
 
index b1f18395c04a8841c386e5767b66b38bb9223363..e14ec6e4c8d03059346a7ab66d131ea4fd61cfb1 100755 (executable)
@@ -41,7 +41,7 @@ my $str  = Hmon::MakeTitle(12, 7, "Beam Abort Flags",0);
 Hmon::WriteFile("BeamAbortFlags",$str);    
 
 #Reset error flag
-system("ssh hadeswrp02 /home/hadaq/bin/reset_beamabort_error.sh");
+#system("ssh hadeswrp02 /home/hadaq/bin/reset_beamabort_error.sh");
 
 trb_init_ports() or die trb_strerror();
 
@@ -61,7 +61,6 @@ while(1) {
   HPlot::PlotAdd("BeamAbortFlags",$ba_global->{0x130}?24:-1,24);    
   HPlot::PlotAdd("BeamAbortFlags",$ba_global->{0x130}?-1:25,25); 
 
-  Hmon::Speak('beamabort',"High radiation levels. Beam abort.") if($ba_global->{0x130});
 
   HPlot::PlotDrawFork("BeamAbortFlags") if $iter == 10;  
   HPlot::PlotJsonDump("BeamAbortFlags",Hmon::HMONDIR."/files/BeamAbortFlags.json") if $iter == 9;
index aa3f046925a2851d633f80315c699658e73f40d5..60dafade535c652dc853ed793b03062909d4d804 100755 (executable)
@@ -20,7 +20,7 @@ HPlot::PlotInit({
     output  => HPlot::OUT_PNG,
     zlabel  => "Hitrate",
     sizex   => 450,
-    sizey   => 360,
+    sizey   => 320,
     nokey   => 1,
     buffer  => 1,
     xmin    => -0.5,
@@ -33,7 +33,7 @@ HPlot::PlotInit({
     additional => "set xtics ('TOF' 0, 'RPC' 1, 'Meta' 2, 'iTOF' 3, 'Coin' 4);set x2tics ('TOF' 0, 'RPC' 1, 'Meta' 2, 'iTOF' 3, 'Coin' 4);",
 });
 
-my $str  = Hmon::MakeTitle(6, 8, "Trigger Rates per Sector");
+my $str  = Hmon::MakeTitle(6, 7, "Trigger Rates per Sector");
    $str .= qq@<img src="%ADDPNG files/TriggerRatesPerSector.png%" type="image/png"><br>\n@;
    $str .= Hmon::MakeFooter();
    Hmon::WriteFile("TriggerRatesPerSector",$str);  
index 2f0796246173c83e3647300a8258be10144cca03..c7fff68445fe5989fc4e5dccaa6e3e61ccab1ea5 100755 (executable)
@@ -11,14 +11,24 @@ use Data::Dumper;
 use List::MoreUtils qw(uniq);
 use List::Util qw(min max);
 use HADES::TrbNet;
+use Storable qw(store lock_retrieve);
 
+
+my $store;
+my $storefile = '/dev/shm/hmon_endpoints.store';
+  if (-e $storefile) {
+      $store = lock_retrieve($storefile);
+    }
+
+    
 trb_init_ports() or die trb_strerror();
 my $flog = QA::OpenQAFile();
 my $waittime = 15;
-my $mdcmissingtime = 0;
+my $mdcmissingtime = $store->{mdc}{missingtime};
 my $loggerperiod = 12; #times 5 seconds sleep
 my $timecnt;
 
+
 my $fh;
 open ($fh, ">", "/tmp/mdc_number_missing_boards");
 if (!$fh) {
@@ -231,8 +241,8 @@ while(1) {
 
     ###strip the register value
     for (my $k = 0; $k < scalar @result; $k += 2) {
-       push @all_boards, $result[$k];
-    }
+      push @all_boards, $result[$k];
+      }
 
 ###MDC
 ########################
@@ -242,15 +252,15 @@ while(1) {
     foreach my $element (@mdc_boards) { $mdc_mask{$element} |= 2 }
     foreach my $element (@QA::mdc_boards_removed) { $mdc_mask{$element} |= 4 }
     foreach my $element (keys %mdc_mask) {
-       push @{$mdc_results[0]}, sprintf("0x%x",$element);
-       push @{$mdc_results[$mdc_mask{$element}]}, sprintf("0x%x",$element);
+      push @{$mdc_results[0]}, sprintf("0x%x",$element);
+      push @{$mdc_results[$mdc_mask{$element}]}, sprintf("0x%x",$element);
     }
 
     my $num_mdc_missing = (scalar @{$mdc_results[2]});
     my $num_mdc_mistake = (scalar @{$mdc_results[4]});
     my @sorted_mdc_results = sort @{$mdc_results[2]};
 
-    $mdcmissingtime = 0 if $num_mdc_missing == 0;
+    $mdcmissingtime = 0 if $num_mdc_missing <= 2;
     $mdcmissingtime += max(0,$num_mdc_missing-2);
     
     #Are two boards from the same chamber missing?
@@ -289,9 +299,16 @@ while(1) {
     Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate >= QA::ERROR );
     QA::WriteQALog($flog,"endp","mdc",$waittime,$qastate,$title,$value,$longtext);
     if($qastate > 60) {
+      $longtext =~ s/\<br\>//g;
       system("logger -p local1.info -t DAQ Endp \\<E\\> $longtext") unless (($timecnt->{mdc}++)%$loggerperiod);
       }
     else {$timecnt->{mdc} = 0;}
+    
+    $store->{mdc}{missing}       = \@sorted_mdc_results;
+    $store->{mdc}{missingnumber} = $num_mdc_missing;
+    $store->{mdc}{missingtime}   = $mdcmissingtime;
+    store($store,$storefile);
+    
 
 ###RICH
 ########################
@@ -354,10 +371,11 @@ while(1) {
 
 
     my $rich_title    = "RICH";
-    my $rich_value    = "OK ".(scalar @rich_boards);
+    my $rich_value    = "OK ".(scalar @rich_boards - scalar @QA::rich_boards_removed);
+       $rich_value .= "(-".(scalar @QA::rich_boards_removed).")" if scalar @QA::rich_boards_removed;
     if ($num_rich_missing > 0) {$rich_value = "$num_rich_missing / ".(scalar @rich_boards)." miss";} 
     if ($num_rich_mistake > 0) {$rich_value = "Check Script";} 
-    my $rich_longtext = (scalar @rich_boards). " boards. ";
+    my $rich_longtext = (scalar @rich_boards). " boards. ".(scalar @QA::rich_boards_removed)." removed<br>";
     if ($num_rich_missing > 0) {$rich_longtext = "Endp @sorted_rich_results missing"}; 
     if ($num_rich_mistake > 0) {$rich_longtext .= " Endp @{$rich_results[4]} not known";} 
 
index 2b6ad1e322ca3a0e13d0fef96e5fd4c1e061de1f..08f7610f98673b25e041a1294a8d000ac2e7c1cb 100755 (executable)
@@ -49,7 +49,7 @@ $plot2->{type}    = HPlot::TYPE_HEATMAP;
 $plot2->{output}  = HPlot::OUT_PNG;
 $plot2->{zlabel}  = "Hitrate";
 $plot2->{sizex}   = 450;
-$plot2->{sizey}   = 360;
+$plot2->{sizey}   = 330;
 $plot2->{nokey}   = 1;
 $plot2->{buffer}  = 1;
 $plot2->{xmin}    = -0.5;
@@ -68,7 +68,7 @@ $str .= qq@<img src="%ADDPNG files/ItofRate.png%" type="image/png"><br>\n@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("ItofRate",$str);
 
-$str  = Hmon::MakeTitle(6, 8, "iTOF Hit Rate");
+$str  = Hmon::MakeTitle(6, 7, "iTOF Hit Rate");
 $str .= qq@<img src="%ADDPNG files/ItofNumbers.png%" type="image/png"><br>\n@;
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("ItofRateNumbers",$str);
index 2099f611787cd5add845b5bbda4b4716e16934fb..9365735160e5444db15de6b1d089b75bb02b8cf5 100755 (executable)
@@ -40,23 +40,33 @@ while(1) {
   my $value = "";
   my $qastate = QA::OK;
   
-  my $o = trb_register_read(0xffff,0xd501);
+  my $o = trb_register_read_mem(0xffff,0xd501,0,2);
+
   foreach my $b (keys %$o) {
-    next if $o->{$b} == 0x00000008;
-    next if $o->{$b} == 0x00000000;
+    next if ($b & 0xf000) == 0x2000;
+    next if ($b & 0xf000) == 0x1000;
+    next if ($b ) < 0x10;
+    next unless defined $o->{$b}[0];
+    next if $o->{$b}[0] == 0x00000008;
+    next if $o->{$b}[0] == 0x00000000;
     $totalboards++;
-    next unless $o->{$b} & 0xFF000000;
+    next unless ((($o->{$b}[0]//0) & 0xFF000000) || (($o->{$b}[1]//0) & 0xFF));
     $seuboards++;
     push(@boards,$b);
     }
   $longtext = "$seuboards out of $totalboards monitored report some radiation issues<br>";  
   $longtext .= sprintf("%04x (%s)<br>",$_,Hmon::getsystem($_)) for sort @boards;
   
-  if($seuboards >= 8) {
+  if($seuboards >= 12) {
+    $qastate = QA::WARN;
+    }
+  if($seuboards >= 16) {
     $longtext .= "<br>Quite many boards seem to be affected by radiation. Better do some reboots soon.";
     $qastate = QA::WARN_2;
     }
   $value = "$seuboards/$totalboards";
+#   print $value."\n";
+#   print $longtext."\n";
   QA::WriteQALog($fqa,"misc","seu",30,$qastate,'SEU',$value,$longtext);
   sleep 10;
   }
index ac9da0ab3e618189911bc0c56443bd926eea897b..2dc8964100f4f5ce487db95e3b15e5e5386c73b6 100755 (executable)
@@ -168,6 +168,7 @@ my $plot7a = {
     buffer  => 1,
     stacked => 1,
     curvewidth  => .9,
+    key => 0,
     additional => "
   set obj 1 rect from   -1, 7E7 to  200, 10E7 fc rgb '#ffffbb' behind \n
   set obj 2 rect from   -1, 10E7 to  200, 100E7 fc rgb '#ffdddd' behind
@@ -176,6 +177,34 @@ my $plot7a = {
 HPlot::PlotInit($plot7a);
 
 
+my $plot7b = {
+    name    => "StartRateX_histbar_short",
+    file    => "files/StartRateX_histbar_short",
+    entries => 400,
+    type    => HPlot::TYPE_BARGRAPH,
+    output  => HPlot::OUT_PNG,
+    titles  => ["0","1","2","3","4","5","6","7","8","9","10","11"],
+    xlabel  => "Time / 100 ms",
+    ylabel  => "Hitrate [Hz]",
+    sizex   => 950,
+    sizey   => 330,
+    xmin    => 0,
+    xmax    => 400,
+    ymin    => "0",
+    ymax    => "100<*",
+    curves  => 12,
+    xscale  => 10, # xscale does not work with TYPE_BARGRAPH
+    buffer  => 1,
+    stacked => 1,
+    curvewidth  => .9,
+    key => 0,
+    additional => "
+  set obj 1 rect from   -1, 7E7 to  200, 10E7 fc rgb '#ffffbb' behind \n
+  set obj 2 rect from   -1, 10E7 to  200, 100E7 fc rgb '#ffdddd' behind
+    "
+    };
+HPlot::PlotInit($plot7b);
+
 # my $plot8 = {
 #     name    => "StartRateY_1histbar_VW",
 #     file    => "files/StartRateY_1histbar_VW",
@@ -406,6 +435,12 @@ $str .= qq@<img src="%ADDPNG files/StartRateY_histbar_short.png%" type="image/pn
 $str .= Hmon::MakeFooter();
 Hmon::WriteFile("StartRateY_histbar_short",$str);
 
+$str  = Hmon::MakeTitle(12, 7, "Start Summed Rates X",0);
+$str .= qq@<img src="%ADDPNG files/StartRateX_histbar_short.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StartRateX_histbar_short",$str);
+
+
 # Spill for START
 # $str  = Hmon::MakeTitle(13, 32, "Start X Spill Summary",0);
 # $str .= qq@<h3>Start X Spill</h3><img src="%ADDPNG files/StartRateX_histbar.png%" type="image/png"><br>\n@;
@@ -806,6 +841,7 @@ while(1) {
             for my $i (0..11){              
                 HPlot::PlotAdd("StartRateX_histbar",$summedRatesFor4Channels_X0[$i],$i);
                 HPlot::PlotAdd("StartRateY_histbar",$summedRatesFor4Channels_Y0[$i],$i);
+                HPlot::PlotAdd("StartRateX_histbar_short",$summedRatesFor4Channels_X0[$i],$i);
                 HPlot::PlotAdd("StartRateY_histbar_short",$summedRatesFor4Channels_Y0[$i],$i);
             
             }
@@ -999,6 +1035,7 @@ while(1) {
                 HPlot::PlotDrawFork('StartDutyFactorY_0');
                 
                 HPlot::PlotJsonDump("StartRateY_histbar_short",Hmon::HMONDIR."/files/StartRateY_histbar_short.json");
+                HPlot::PlotJsonDump("StartRateX_histbar_short",Hmon::HMONDIR."/files/StartRateX_histbar_short.json");
             }
             
             if($inspill) {
@@ -1031,6 +1068,7 @@ while(1) {
 #             HPlot::PlotDrawFork('StartRateX_1histbar_VW') if ($iter == 5);
             HPlot::PlotDrawFork('StartRateY_histbar') if ($iter == 6);
             HPlot::PlotDrawFork('StartRateY_histbar_short') if ($iter == 7);
+            HPlot::PlotDrawFork('StartRateX_histbar_short') if ($iter == 8);
 #             HPlot::PlotDrawFork('StartRateY_1histbar_VW') if ($iter == 7);
             
             $iter = 1                                 if ($iter++ == 10) #dont change
index b9b885edf154407c4383fc5f70cdafe2d4010d81..9c837e935636754bdcca984c19805b22494c56c0 100755 (executable)
@@ -247,13 +247,14 @@ while (1) {
         $qastatratio = QA::WARN;
         }
       
-      $ratiolongmsg = sprintf("counts per second %s/s  - counts per spill %s",QA::SciNotation($start),QA::SciNotation($lastspillsumstart));
+      $ratiolongmsg = sprintf("counts per second %s/s  - counts per spill %s",QA::SciNotation($startdirect),QA::SciNotation($lastspillsumstart));
       QA::WriteQALog($fqa, "trg", "pt1rate", 10, $qastatratio, "Trg Ratios", $ratiomsg, $ratiolongmsg);
       
 
       }
       
-      
+#      printf ("%8i\t%8i\n",$start,$startdirect);
+   
     }
     
   $oldtb = $tb;
diff --git a/hmon/hmon_waterfall.pl b/hmon/hmon_waterfall.pl
new file mode 100755 (executable)
index 0000000..67be166
--- /dev/null
@@ -0,0 +1,325 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max sum];
+
+my $oldst;
+my $diff;
+my $iter = 0;
+my $tdiff; my $vdiff;
+
+HPlot::PlotInit({
+    name    => "StartFalls",
+    file    => "files/StartFalls",
+    entries => 200,
+    curves  => 97,
+    type    => HPlot::TYPE_HEATMAP,
+    output  => HPlot::OUT_PNG,
+    xlabel  => "Time [100ms]",
+    ylabel  => "Start Channel",
+    cblabel => "Share of each stripe of total rate",
+    sizex   => 900,
+    sizey   => 480,
+    nokey   => 1,
+    buffer  => 1,
+    xmin    => -0.5,
+    xmax    => 199.5,
+    ymin    => 96.5,
+    ymax    => -0.5,
+    cbmin   => "0",
+#     cbmax   => "1000<*",
+#     additional => "set logscale cb",
+});
+
+
+my $str  = Hmon::MakeTitle(12, 10, "Start Falls");
+   $str .= qq@<img src="%ADDPNG files/StartFalls.png%" type="image/png"><br>\n@;
+   $str .= Hmon::MakeFooter();
+   Hmon::WriteFile("StartFalls",$str);  
+
+   
+trb_init_ports() or die trb_strerror();
+
+my $channels_x_1 = [
+                  { pch =>  2,  tdc => 6, ch => int(1 /2)},                  # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>  1,  tdc => 6, ch => int(3 /2)},                  # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>  4,  tdc => 6, ch => int(5 /2)},
+                  { pch =>  3,  tdc => 6, ch => int(7 /2)},
+                  { pch =>  6,  tdc => 6, ch => int(9 /2)},
+                  { pch =>  5,  tdc => 6, ch => int(11/2)},
+                  { pch =>  8,  tdc => 6, ch => int(13/2)},
+                  { pch =>  7,  tdc => 6, ch => int(15/2)},
+                  { pch => 10,  tdc => 6, ch => int(17/2)},
+                  { pch =>  9,  tdc => 6, ch => int(19/2)},
+                  { pch => 12,  tdc => 6, ch => int(21/2)},
+                  { pch => 11,  tdc => 6, ch => int(23/2)},
+                  { pch => 14,  tdc => 6, ch => int(25/2)},
+                  { pch => 13,  tdc => 6, ch => int(27/2)},
+                  { pch => 16,  tdc => 6, ch => int(29/2)},
+                  { pch => 15,  tdc => 6, ch => int(31/2)},
+                  { pch => 18,  tdc => 6, ch => int(33/2)},
+                  { pch => 17,  tdc => 6, ch => int(35/2)},
+                  { pch => 20,  tdc => 6, ch => int(37/2)},
+                  { pch => 19,  tdc => 6, ch => int(39/2)},
+                  { pch => 22,  tdc => 6, ch => int(41/2)},
+                  { pch => 21,  tdc => 6, ch => int(43/2)},
+                  { pch => 24,  tdc => 6, ch => int(45/2)},
+                  { pch => 23,  tdc => 6, ch => int(47/2)},
+                  { pch => 34,  tdc => 7, ch => int(1 /2)},
+                  { pch => 33,  tdc => 7, ch => int(3 /2)},
+                  { pch => 36,  tdc => 7, ch => int(5 /2)},
+                  { pch => 35,  tdc => 7, ch => int(7 /2)},
+                  { pch => 38,  tdc => 7, ch => int(9 /2)},
+                  { pch => 37,  tdc => 7, ch => int(11/2)},
+                  { pch => 40,  tdc => 7, ch => int(13/2)},
+                  { pch => 39,  tdc => 7, ch => int(15/2)},
+                  { pch => 42,  tdc => 7, ch => int(17/2)},
+                  { pch => 41,  tdc => 7, ch => int(19/2)},
+                  { pch => 44,  tdc => 7, ch => int(21/2)},
+                  { pch => 43,  tdc => 7, ch => int(23/2)},
+                  { pch => 46,  tdc => 7, ch => int(25/2)},
+                  { pch => 45,  tdc => 7, ch => int(27/2)},
+                  { pch => 48,  tdc => 7, ch => int(29/2)},
+                  { pch => 47,  tdc => 7, ch => int(31/2)},
+                  { pch => 26,  tdc => 7, ch => int(33/2)},
+                  { pch => 25,  tdc => 7, ch => int(35/2)},
+                  { pch => 28,  tdc => 7, ch => int(37/2)},
+                  { pch => 27,  tdc => 7, ch => int(39/2)},
+                  { pch => 30,  tdc => 7, ch => int(41/2)},
+                  { pch => 29,  tdc => 7, ch => int(43/2)},
+                  { pch => 32,  tdc => 7, ch => int(45/2)},
+                  { pch => 31,  tdc => 7, ch => int(47/2)}
+                 ];                              
+                                                 
+my $channels_x_0 = [
+                  { pch =>  15 ,  tdc => 4, ch => int(1 /2)},               # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>  16 ,  tdc => 4, ch => int(3 /2)},               # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>  13 ,  tdc => 4, ch => int(5 /2)},
+                  { pch =>  14 ,  tdc => 4, ch => int(7 /2)},
+                  { pch =>  11 ,  tdc => 4, ch => int(9 /2)},
+                  { pch =>  12 ,  tdc => 4, ch => int(11/2)},
+                  { pch =>   9 ,  tdc => 4, ch => int(13/2)},
+                  { pch =>  10 ,  tdc => 4, ch => int(15/2)},
+                  { pch =>   7 ,  tdc => 4, ch => int(17/2)},
+                  { pch =>   8 ,  tdc => 4, ch => int(19/2)},
+                  { pch =>   5 ,  tdc => 4, ch => int(21/2)},
+                  { pch =>   6 ,  tdc => 4, ch => int(23/2)},
+                  { pch =>   3 ,  tdc => 4, ch => int(25/2)},
+                  { pch =>   4 ,  tdc => 4, ch => int(27/2)},
+                  { pch =>   1 ,  tdc => 4, ch => int(29/2)},
+                  { pch =>   2 ,  tdc => 4, ch => int(31/2)},
+                  { pch =>  31 ,  tdc => 4, ch => int(33/2)},
+                  { pch =>  32 ,  tdc => 4, ch => int(35/2)},
+                  { pch =>  29 ,  tdc => 4, ch => int(37/2)},
+                  { pch =>  30 ,  tdc => 4, ch => int(39/2)},
+                  { pch =>  27 ,  tdc => 4, ch => int(41/2)},
+                  { pch =>  28 ,  tdc => 4, ch => int(43/2)},
+                  { pch =>  25 ,  tdc => 4, ch => int(45/2)},
+                  { pch =>  26 ,  tdc => 4, ch => int(47/2)},
+                  { pch =>  47 ,  tdc => 5, ch => int(1 /2)},
+                  { pch =>  48 ,  tdc => 5, ch => int(3 /2)},
+                  { pch =>  45 ,  tdc => 5, ch => int(5 /2)},
+                  { pch =>  46 ,  tdc => 5, ch => int(7 /2)},
+                  { pch =>  43 ,  tdc => 5, ch => int(9 /2)},
+                  { pch =>  44 ,  tdc => 5, ch => int(11/2)},
+                  { pch =>  41 ,  tdc => 5, ch => int(13/2)},
+                  { pch =>  42 ,  tdc => 5, ch => int(15/2)},
+                  { pch =>  39 ,  tdc => 5, ch => int(17/2)},
+                  { pch =>  40 ,  tdc => 5, ch => int(19/2)},
+                  { pch =>  37 ,  tdc => 5, ch => int(21/2)},
+                  { pch =>  38 ,  tdc => 5, ch => int(23/2)},
+                  { pch =>  35 ,  tdc => 5, ch => int(25/2)},
+                  { pch =>  36 ,  tdc => 5, ch => int(27/2)},
+                  { pch =>  33 ,  tdc => 5, ch => int(29/2)},
+                  { pch =>  34 ,  tdc => 5, ch => int(31/2)},
+                  { pch =>  23 ,  tdc => 5, ch => int(33/2)},
+                  { pch =>  24 ,  tdc => 5, ch => int(35/2)},
+                  { pch =>  21 ,  tdc => 5, ch => int(37/2)},
+                  { pch =>  22 ,  tdc => 5, ch => int(39/2)},
+                  { pch =>  19 ,  tdc => 5, ch => int(41/2)},
+                  { pch =>  20 ,  tdc => 5, ch => int(43/2)},
+                  { pch =>  17 ,  tdc => 5, ch => int(45/2)},
+                  { pch =>  18 ,  tdc => 5, ch => int(47/2)}
+                 ];
+my $channels_y_1 = [
+                  { pch =>  2,   tdc => 2, ch => int(1 /2)},                   # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC.
+                  { pch =>  1,   tdc => 2, ch => int(3 /2)},                   # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>  4,   tdc => 2, ch => int(5 /2)},
+                  { pch =>  3,   tdc => 2, ch => int(7 /2)},
+                  { pch =>  6,   tdc => 2, ch => int(9 /2)},
+                  { pch =>  5,   tdc => 2, ch => int(11/2)},
+                  { pch =>  8,   tdc => 2, ch => int(13/2)},
+                  { pch =>  7,   tdc => 2, ch => int(15/2)},
+                  { pch => 10,   tdc => 2, ch => int(17/2)},
+                  { pch =>  9,   tdc => 2, ch => int(19/2)},
+                  { pch => 12,   tdc => 2, ch => int(21/2)},
+                  { pch => 11,   tdc => 2, ch => int(23/2)},
+                  { pch => 14,   tdc => 2, ch => int(25/2)},
+                  { pch => 13,   tdc => 2, ch => int(27/2)},
+                  { pch => 16,   tdc => 2, ch => int(29/2)},
+                  { pch => 15,   tdc => 2, ch => int(31/2)},
+                  { pch => 18,   tdc => 2, ch => int(33/2)},
+                  { pch => 17,   tdc => 2, ch => int(35/2)},
+                  { pch => 20,   tdc => 2, ch => int(37/2)},
+                  { pch => 19,   tdc => 2, ch => int(39/2)},
+                  { pch => 22,   tdc => 2, ch => int(41/2)},
+                  { pch => 21,   tdc => 2, ch => int(43/2)},
+                  { pch => 24,   tdc => 2, ch => int(45/2)},
+                  { pch => 23,   tdc => 2, ch => int(47/2)},
+                  { pch => 34,   tdc => 3, ch => int(1 /2)},
+                  { pch => 33,   tdc => 3, ch => int(3 /2)},
+                  { pch => 36,   tdc => 3, ch => int(5 /2)},
+                  { pch => 35,   tdc => 3, ch => int(7 /2)},
+                  { pch => 38,   tdc => 3, ch => int(9 /2)},
+                  { pch => 37,   tdc => 3, ch => int(11/2)},
+                  { pch => 40,   tdc => 3, ch => int(13/2)},
+                  { pch => 39,   tdc => 3, ch => int(15/2)},
+                  { pch => 42,   tdc => 3, ch => int(17/2)},
+                  { pch => 41,   tdc => 3, ch => int(19/2)},
+                  { pch => 44,   tdc => 3, ch => int(21/2)},
+                  { pch => 43,   tdc => 3, ch => int(23/2)},
+                  { pch => 46,   tdc => 3, ch => int(25/2)},
+                  { pch => 45,   tdc => 3, ch => int(27/2)},
+                  { pch => 48,   tdc => 3, ch => int(29/2)},
+                  { pch => 47,   tdc => 3, ch => int(31/2)},
+                  { pch => 26,   tdc => 3, ch => int(33/2)},
+                  { pch => 25,   tdc => 3, ch => int(35/2)},
+                  { pch => 28,   tdc => 3, ch => int(37/2)},
+                  { pch => 27,   tdc => 3, ch => int(39/2)},
+                  { pch => 30,   tdc => 3, ch => int(41/2)},
+                  { pch => 29,   tdc => 3, ch => int(43/2)},
+                  { pch => 32,   tdc => 3, ch => int(45/2)},
+                  { pch => 31,   tdc => 3, ch => int(47/2)}
+                 ];
+                 
+                 
+my $channels_y_0 = [
+                  { pch =>   15 ,  tdc => 0 , ch => int(1 /2)},              # Int(ch/2) because we read from monitoring register, which counts 0-23 for each TDC. 
+                  { pch =>   16 ,  tdc => 0 , ch => int(3 /2)},              # Take care that the functions copy pasted DO NOT have a "-1" for the channels!
+                  { pch =>   13 ,  tdc => 0 , ch => int(5 /2)},
+                  { pch =>   14 ,  tdc => 0 , ch => int(7 /2)},
+                  { pch =>   11 ,  tdc => 0 , ch => int(9 /2)},
+                  { pch =>   12 ,  tdc => 0 , ch => int(11/2)},
+                  { pch =>    9 ,  tdc => 0 , ch => int(13/2)},
+                  { pch =>   10 ,  tdc => 0 , ch => int(15/2)},
+                  { pch =>    7 ,  tdc => 0 , ch => int(17/2)},
+                  { pch =>    8 ,  tdc => 0 , ch => int(19/2)},
+                  { pch =>    5 ,  tdc => 0 , ch => int(21/2)},
+                  { pch =>    6 ,  tdc => 0 , ch => int(23/2)},
+                  { pch =>    3 ,  tdc => 0 , ch => int(25/2)},
+                  { pch =>    4 ,  tdc => 0 , ch => int(27/2)},
+                  { pch =>    1 ,  tdc => 0 , ch => int(29/2)},
+                  { pch =>    2 ,  tdc => 0 , ch => int(31/2)},
+                  { pch =>   31 ,  tdc => 0 , ch => int(33/2)},
+                  { pch =>   32 ,  tdc => 0 , ch => int(35/2)},
+                  { pch =>   29 ,  tdc => 0 , ch => int(37/2)},
+                  { pch =>   30 ,  tdc => 0 , ch => int(39/2)},
+                  { pch =>   27 ,  tdc => 0 , ch => int(41/2)},
+                  { pch =>   28 ,  tdc => 0 , ch => int(43/2)},
+                  { pch =>   25 ,  tdc => 0 , ch => int(45/2)},
+                  { pch =>   26 ,  tdc => 0 , ch => int(47/2)},
+                  { pch =>   47 ,  tdc => 1 , ch => int(1 /2)},
+                  { pch =>   48 ,  tdc => 1 , ch => int(3 /2)},
+                  { pch =>   45 ,  tdc => 1 , ch => int(5 /2)},
+                  { pch =>   46 ,  tdc => 1 , ch => int(7 /2)},
+                  { pch =>   43 ,  tdc => 1 , ch => int(9 /2)},
+                  { pch =>   44 ,  tdc => 1 , ch => int(11/2)},
+                  { pch =>   41 ,  tdc => 1 , ch => int(13/2)},
+                  { pch =>   42 ,  tdc => 1 , ch => int(15/2)},
+                  { pch =>   39 ,  tdc => 1 , ch => int(17/2)},
+                  { pch =>   40 ,  tdc => 1 , ch => int(19/2)},
+                  { pch =>   37 ,  tdc => 1 , ch => int(21/2)},
+                  { pch =>   38 ,  tdc => 1 , ch => int(23/2)},
+                  { pch =>   35 ,  tdc => 1 , ch => int(25/2)},
+                  { pch =>   36 ,  tdc => 1 , ch => int(27/2)},
+                  { pch =>   33 ,  tdc => 1 , ch => int(29/2)},
+                  { pch =>   34 ,  tdc => 1 , ch => int(31/2)},
+                  { pch =>   23 ,  tdc => 1 , ch => int(33/2)},
+                  { pch =>   24 ,  tdc => 1 , ch => int(35/2)},
+                  { pch =>   21 ,  tdc => 1 , ch => int(37/2)},
+                  { pch =>   22 ,  tdc => 1 , ch => int(39/2)},
+                  { pch =>   19 ,  tdc => 1 , ch => int(41/2)},
+                  { pch =>   20 ,  tdc => 1 , ch => int(43/2)},
+                  { pch =>   17 ,  tdc => 1 , ch => int(45/2)},
+                  { pch =>   18 ,  tdc => 1 , ch => int(47/2)}
+                 ];
+
+
+
+while (1) {
+ my $st = trb_registertime_read_mem(0xfe76,0xdfc0,0,24);
+  
+
+
+  if (defined $oldst) {
+
+    foreach my $b (keys %$st) {
+      next if ($b < 0x5000 || $b > 0x5008);
+      my $s = ($b & 0xF)*24;
+      my $tdiff = $st->{$b}{time}[0] - ($oldst->{$b}{time}[0]||0);
+      $tdiff += 2**16 if ($tdiff <= 0);
+      $tdiff = ($tdiff * 16 / 1E6) || 1;
+      for my $v (0..23) {
+        $vdiff = (($st->{$b}{value}[$v]||0)&0xffffff) - (($oldst->{$b}{value}[$v]||0)&0xffffff);
+        $vdiff += 2**24 if ($vdiff < 0);
+        $diff->{$b}->[$v] = $vdiff/$tdiff;
+#   print (($s+$v)."\t".$diff->{$b}->[$v]."\n");
+
+
+        }
+      }
+    my $startdirectx = sum(@{$diff->{0x5004}},@{$diff->{0x5005}},@{$diff->{0x5006}},@{$diff->{0x5007}});
+    my $startdirecty = sum(@{$diff->{0x5000}},@{$diff->{0x5001}},@{$diff->{0x5002}},@{$diff->{0x5003}});
+    my @y; my @x;
+      for my $e (0..47) {
+
+        my $b = 0x5000 + $channels_y_0->[$e]->{tdc};
+        my $v =          $channels_y_0->[$e]->{ch};
+           $y[$channels_y_0->[$e]->{pch}] += $diff->{$b}->[$v]; 
+        
+           $b = 0x5000 + $channels_y_1->[$e]->{tdc};
+           $v =          $channels_y_1->[$e]->{ch};
+           $y[$channels_y_1->[$e]->{pch}] += $diff->{$b}->[$v]; 
+           
+           $b = 0x5000 + $channels_x_0->[$e]->{tdc};
+           $v =          $channels_x_0->[$e]->{ch};
+           $x[$channels_x_0->[$e]->{pch}] += $diff->{$b}->[$v]; 
+        
+           $b = 0x5000 + $channels_x_1->[$e]->{tdc};
+           $v =          $channels_x_1->[$e]->{ch};
+           $x[$channels_x_1->[$e]->{pch}] += $diff->{$b}->[$v];         
+           
+#         HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]+$diff->{$b}->[$v]/$startdirect,$channels_y_0->[$e]->{pch});
+# #         $b = 0x5000 + $channels_y_1->[$e]->{tdc};
+# #         $v =          $channels_y_1->[$e]->{ch};
+# #         HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_y_1->[$e]->{pch}+48);
+#         $b = 0x5000 + $channels_x_0->[$e]->{tdc};
+#         $v =          $channels_x_0->[$e]->{ch};
+#         HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_x_0->[$e]->{pch}+96);
+# #         $b = 0x5000 + $channels_x_1->[$e]->{tdc};
+# #         $v =          $channels_x_1->[$e]->{ch};
+# #         HPlot::PlotAdd("StartFalls",$diff->{$b}->[$v]/$startdirect,$channels_x_1->[$e]->{pch}+144);
+        }
+      for my $e (0..47) {
+#         print $e."\n";
+        HPlot::PlotAdd("StartFalls",$y[$e+1]/$startdirecty,$e);
+        HPlot::PlotAdd("StartFalls",$x[$e+1]/$startdirectx,$e+49);
+        HPlot::PlotAdd("StartFalls","NaN",48);
+        }
+    }
+  $oldst = $st;
+  
+  HPlot::PlotDrawFork("StartFalls") if $iter == 100;
+  
+  $iter = 0 if $iter++ == 100;  
+  
+  usleep(100000);
+  }
index f9f2aa2a7ff2d6fb0e445bff1f7128d11e1b5dd4..c771078e80245e6a0dfaba6545231dd16103cccb 100755 (executable)
@@ -34,7 +34,7 @@ function openwin(url) {
 <li><a href="../daqtools/index.pl" target="_blank">Web Tools (daqtools)</a></li>
 <li><a href="../eb/?browser=fix" target="_blank">Eventbuilder Monitor</a></li>
 <li><a href="../rawmon/" target="_blank">Raw Data Monitor</a></li>
-<li><a href="http://web-docs.gsi.de/~webhades/media/logbook/feb22/hades-online.html" target="_blank">Accumulated Run Statistics</a>
+<li><a href="https://web-docs.gsi.de/~webhades/onlineMon/feb22/hades-online.html" target="_blank">Accumulated Run Statistics</a>
 </ul></div>
 
 <div class="linkbox" style="float:right"><h4>Documents</h4><ul>
@@ -51,9 +51,10 @@ function openwin(url) {
 <li style="width:600px;"><a href="monitor.cgi?1-window-QA">Main Screen 0</a> Tactical Overview
 <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-window14x14-EBSummary-hldlast-CTSRates">Main Screen 3</a> EBs</li>
-<li style="width:600px;"><a href="monitor.cgi?2-window18x16-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-window13x18-HodoRate-ItofRateNumbers-StartRateNumbers-TriggerRatesPerSector">Main Screen 5</a> Positional map for Start Veto iTOF</li>
+<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-window13x23-StartFalls-ItofRateNumbers-TriggerRatesPerSector-CTSRates">Main Screen 5</a> Positional map for Start and iTOF, Trigger Rates</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window12x21-RpcTofSectorRate_highres-StartRateX_histbar-StartRateY_histbar">Main Screen 6</a> Beam Intensities</li>
 </ul></div>
 
 <div class="linkbox" style="clear:both;width:730px;"><h4>Other Ressources</h4><ul>
@@ -63,7 +64,7 @@ function openwin(url) {
 <!--<li class="outdated"><a href="../spillmon/?browser=no&monitoring=1000&layout=grid4x4&items=[%22EventBuilder/Run/HLD/HLD_HitsFast%22,%22EventBuilder/Run/HLD/HLD_HitsSlow%22,%22EventBuilder/Run/HLD/HLD_TrendX%22,%22EventBuilder/Run/HLD/HLD_TrendY%22,%22EventBuilder/Run/HLD/HLD_BeamX%22,%22EventBuilder/Run/HLD/HLD_BeamY%22,%22EventBuilder/Run/HLD/HLD_VETO_Patt%22,%22EventBuilder/Run/HLD/HLD_QSlow%22,%22EventBuilder/Run/HLD/HLD_HALO_Patt%22,%22EventBuilder/Run/HLD/HLD_XHALOSlow%22,%22EventBuilder/Run/HLD/HLD_YHALOSlow%22,%22EventBuilder/Run/HLD/HLD_LastSpill_Q_factor%22]">Beam Properties</a></li>-->
 <li class="outdated"><a href="http://lxhadeb06/icinga">Icinga Server Monitoring (local access only)</a>
 <li><a href="/calib">Calibration Monitor</a>
-<li><a href="../munin">Munin Server Monitoring</a></li>
+<li><a href="/munin">Munin Server Monitoring</a></li>
 <li style="width:600px;"><a href="archive/?C=M;O=D">Archive of Hmon Windows (updated every 10 minutes)</a></li>
 </ul></div>
 
index 8317802086fbcac95cd1815fbf403a5d416855cc..08f0fb53fa69ae09394a1d5a46634ea91d8466a3 100755 (executable)
@@ -33,7 +33,7 @@ my @args = split('-',$ENV{'QUERY_STRING'});
       my $str = <$MYF>;
       close($MYF);
       $str =~ /width(\d+)\sheight(\d+)/;
-      $width = 80*$1-4;
+      $width = 80*$1+4;
       $height = 50*$2;
       }
 
index cb8a1d53d86048dde140d752962616ca4a539b98..a022d3f69c19581060a06e730e7e84470b1c76eb 100755 (executable)
@@ -8,67 +8,110 @@ use Data::Dumper;
 use POSIX qw/floor ceil/;
 use Hmon;
 use QA;
+use Perl2Epics;
 
 my $fqa = QA::OpenQAFile();
 
 my @res;
+my @oldres= ("R22222222 #20", "R22222222 #21", "R22222222 #30", "R22222222 #22");
 my $cmd = 'ssh hadaq@hadeswrp02 "~/bin/readreg.sh"';
 my $longtext;
 my $value = "";
 my $qastate;
 my $laststate = QA::ERROR;
+my $iterator = 0;
+Perl2Epics::Connect("fpga", "HAD:BEAM:beamAbort:status:FPGA");
+Perl2Epics::Connect("soft", "HAD:BEAM:beamAbort:status:soft");
+Perl2Epics::Connect("hard", "HAD:BEAM:beamAbort:status:hard");
+Perl2Epics::Connect("latch", "HAD:BEAM:beamAbort:status:latch");
+Perl2Epics::Connect("iterator", "HAD:BEAM:beamAbort:status:filler");
 
 while (1) {
 
   @res = qx($cmd);
 
 # print Dumper @res;
-  if(!defined $res[0] || !defined $res[1] || !defined $res[2]) {
+  if(!defined $res[0] || !defined $res[2] || !defined $res[3]) {
     $qastate  = QA::WARN_2;
     $value    = "read failed";
     $longtext = "reading status from adapter board failed";
-    }
+  }
   else {
-  $qastate = QA::OK;
-  $longtext = "";
-  $value    = "";
-  $longtext .= "Inputs: <br>";
-  $longtext .= "FPGA: ";
-  $longtext .= "active"   if (substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10");
-  $longtext .= "inactive" if (substr($res[0],5,2) eq "11");
-  $longtext .= "ABORT"    if (substr($res[0],5,2) eq "00");
-
-  $longtext .= "<br>";
-  $longtext .= "Soft Override: ";
-  $longtext .= "none"     if (substr($res[2],7,2) eq "00");
-  $longtext .= "inactive" if (substr($res[2],7,2) eq "10");
-  $longtext .= "ABORT"    if (substr($res[2],8,1) eq "1");
-
-  $longtext .= "<br>";
-  $longtext .= "Hard Override: ";
-  $longtext .= "none"     if (substr($res[0],7,2) eq "00");
-  $longtext .= "inactive" if (substr($res[0],7,2) eq "10");
-  $longtext .= "ABORT"    if (substr($res[0],8,1) eq "1");
-
-  $longtext .= "<br>";
-  $longtext .= "Beam Abort Latch: ";
-  $longtext .= "none"     if (substr($res[3],3,1) ne "1");
-  $longtext .= "ABORTED"  if (substr($res[3],3,1) eq "1");
-
-  $value = "inactive"  if $longtext =~ /inactive/;
-  $value = "ABORT"     if $longtext =~ /ABORT/;
-  $value = "ABORTED"   if $longtext =~ /ABORTED/;
-  $qastate = QA::WARN  if $longtext =~ /inactive/;
-  $qastate = QA::FATAL if $longtext =~ /ABORT/;
-  $qastate = QA::ERROR if $longtext =~ /ABORTED/;
+    $qastate = QA::OK;
+    $longtext = "";
+    $value    = "";
+    $longtext .= "Inputs: <br>";
+    $longtext .= "FPGA: ";
+    $longtext .= "active"   if (substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10");
+    $longtext .= "inactive" if (substr($res[0],5,2) eq "11");
+    $longtext .= "ABORT"    if (substr($res[0],5,2) eq "00");
+
+    $longtext .= "<br>";
+    $longtext .= "Soft Override: ";
+    $longtext .= "none"     if (substr($res[2],7,2) eq "00");
+    $longtext .= "inactive" if (substr($res[2],7,2) eq "10");
+    $longtext .= "ABORT"    if (substr($res[2],8,1) eq "1");
+
+    $longtext .= "<br>";
+    $longtext .= "Hard Override: ";
+    $longtext .= "none"     if (substr($res[0],7,2) eq "00");
+    $longtext .= "inactive" if (substr($res[0],7,2) eq "10");
+    $longtext .= "ABORT"    if (substr($res[0],8,1) eq "1");
+
+    $longtext .= "<br>";
+    $longtext .= "Beam Abort Latch: ";
+    $longtext .= "none"     if (substr($res[3],3,1) ne "1");
+    $longtext .= "ABORTED"  if (substr($res[3],3,1) eq "1");
+
+    $value = "inactive"  if $longtext =~ /inactive/;
+    $value = "ABORT"     if $longtext =~ /ABORT/;
+    $value = "ABORTED"   if $longtext =~ /ABORTED/;
+    $qastate = QA::WARN  if $longtext =~ /inactive/;
+    $qastate = QA::WARN_2 if $longtext =~ /Soft\sOverride:\sinactive/;
+    $qastate = QA::FATAL if $longtext =~ /ABORT/;
+    $qastate = QA::ERROR if $longtext =~ /ABORTED/;
+    
+    
+    # EPICS part
+#    if(  substr($res[0],5,2) ne substr($oldres[0],5,2)
+#      || substr($res[2],7,2) ne substr($oldres[2],7,2)
+#      || substr($res[0],7,2) ne substr($oldres[0],7,2)
+#      || substr($res[3],3,1) ne substr($oldres[3],3,1)
+#    ) {
+      # print substr($res[0],5,2)." ".substr($res[2],7,2)." ".substr($res[0],7,2)." ".substr($res[3],3,1);
+      Perl2Epics::Put("fpga",0) if substr($res[0],5,2) eq "11";
+      Perl2Epics::Put("fpga",1) if substr($res[0],5,2) eq "01" || substr($res[0],5,2) eq "10";
+      Perl2Epics::Put("fpga",2) if substr($res[0],5,2) eq "00";
+
+      Perl2Epics::Put("soft",0) if substr($res[2],7,2) eq "10";
+      Perl2Epics::Put("soft",1) if substr($res[2],7,2) eq "00";
+      Perl2Epics::Put("soft",2) if substr($res[2],8,1) eq "1";
+
+      Perl2Epics::Put("hard",0) if substr($res[0],7,2) eq "10";
+      Perl2Epics::Put("hard",1) if substr($res[0],7,2) eq "00";
+      Perl2Epics::Put("hard",2) if substr($res[0],8,1) eq "1";
+
+      Perl2Epics::Put("latch",1) if substr($res[3],3,1) ne "1";
+      Perl2Epics::Put("latch",2) if substr($res[3],3,1) eq "1";
+      Perl2Epics::Update(0.2);
+#    }
+  }
+
+  if($iterator == 1) {
+    my $curr_it = Perl2Epics::Get("iterator");
+    Perl2Epics::Put("iterator",$curr_it+1);
+    $iterator = 0;
   }
 
   QA::WriteQALog($fqa,"main","beamabort",30,$qastate,'Beam Abort',$value,$longtext);
 
   if($qastate >= QA::ERROR && $laststate == QA::OK) {
     system("ssh hadaq\@hadesp33 'cd /home/hadaq/trbsoft/daq/hmon; PERL5LIB=. perl ./permanent/hmon_archiver.pl once'");
-    }
+    Hmon::Speak('beamabort',"Beam abort. Beam abort.");
+  }
 
   $laststate = $qastate;
+  @oldres = @res;
+  ++$iterator;
   sleep 5;
-  }
+}
index adee51601e6fedec36abbd8a209ce384887e2874..b8f948d59002b5ce34aced3ee6bf7483f712993d 100755 (executable)
@@ -30,11 +30,9 @@ my $fqa = QA::OpenQAFile();
 #     irq: servicing interrupts
 #     softirq: servicing softirqs
 
-#my @srv = qw(lxhadeb01 lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hades31 hades33); #dcs02-07
-# my @srv = qw( lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadesdaq lxhadeb06 lxhadeb07 lxhadeb13 hadesdaq03 hadesdaq04 hades30 hadesp50 hadesp31 depcp418 hades33 lxhaddcs03 
-# lxhaddcs05 lxhaddcs06 lxhaddcs10 lxhaddcs11);
 # JAM 6.1.2020 - for the moment exlude hosts depcp418 and lxhaddcs03 not available
-my @srv = qw( lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb14 lxhadeb15 lxhadeb16 lxhadesdaq  lxhadeb07 lxhadeb13 hadesdaq03 hadesdaq04 hades30 hadesp57 hadesp31 hades33 hades63 hades66 hadesp70 lxhaddcs05 lxhaddcs06 lxhaddcs10 lxhaddcs11);
+# 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 $template .= "\n<table class=\"colorfields cpu\">\n<tr><th>";
 for(my $d=1;$d<=32;$d++) {
@@ -72,7 +70,7 @@ while(1) {
   my $maxstr = "";
   my $busystr = "";
   if (defined $laststore->{0}->{0}->{'idle'}) {
-    $str = Hmon::MakeTitle(9,13,"Server CPU Usage");
+    $str = Hmon::MakeTitle(9,16,"Server CPU Usage");
     $str .= $template;
     for(my $s = 0; $s < scalar @srv; $s++) {
       $str .= "\n<tr><th class=\"title\">$srv[$s]";
index 97ade9c46f0d7e804344e645a179266ce4c63adc..fd6484fa521c7e09cb033afca4d4b629a2f37462 100755 (executable)
@@ -32,6 +32,9 @@ my @byteshist;
 # with this switch disable qalog and enable printout only JAM
 my $opt_debug = 0;
 my $error_counter = 0;
+# JAM 15-feb-2022 - try to reduce flicker of red errors for temporary missing datarates:
+my $input_err_counter = 0;
+my $builder_err_counter = 0;
 my $persistent_error_state;
 my $speak_counter =0;
 
@@ -286,16 +289,25 @@ while (1) {
   # here check mismatch between running bnet nodes and active ones:
 
   if ($num_bnetin>$num_act_ins) {
-    $qastate = QA::ERROR;
+    $input_err_counter++;
+    if($input_err_counter> 20){
+    # only give error after 20 retries, about 2 spills for feb22...
+        $qastate = QA::ERROR;
+    }
     $qamsg   .= "Only $num_act_ins nodes of $num_bnetin BNET inputs receive data! ";
   } else {
+    $input_err_counter=0;
     $qamsg   .= "Input nodes: $num_bnetin. ";
   }
 
   if ($num_bnetbuild>$num_act_build) {
-    $qastate = QA::ERROR;
+    $builder_err_counter++;
+    if($builder_err_counter> 20){
+        $qastate = QA::ERROR;
+    }
     $qamsg   .= "Only $num_act_build nodes of $num_bnetbuild BNET builders are building events! ";
   } else {
+  $builder_err_counter=0;
     $qamsg   .= "Builder nodes: $num_bnetbuild. ";
   }
 #  if (defined $masterstate)
index 86fd1b35e3f4feb04ca06acf1a1d6472b199afa6..b52e537c06a632ad0c159f0ac4efd4a57eb15e9e 100755 (executable)
@@ -11,8 +11,8 @@ use QA;
 
 
 while(1) {
-  my $out  = Hmon::MakeTitle(4,11,"Last *.hld files"); 
-  $out .= "<pre style='text-align:left;font-size:12px;'> ";
+  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) {
     my $server = sprintf("lxhadeb%02i",$i);
     $out .= "<b>$server</b>\n";
@@ -24,7 +24,7 @@ while(1) {
       $out .= $s;
       }
     }
-    $out .= "<br>All files are available in <br>  /store/NN/01/data/<br>on hades63";
+    $out .= "<br>All files /store/NN/01/data/";
     $out .= "</pre>";
   $out .= Hmon::MakeFooter();
   Hmon::WriteFile("hldlast",$out);
index 80c3fdcb9923c71223cf46ef0d151d29cc223274..388fc99be267e6f23ed39484e13b8849ad5c6711 100755 (executable)
@@ -15,6 +15,9 @@ use HPlot;
 
 my $flog = QA::OpenQAFile();
 
+Perl2Epics::Connect("voltage", "HAD:iTOF:HV:vmon");
+Perl2Epics::Connect("current", "HAD:iTOF:HV:imon");
+
 
 while(1) {
 
@@ -22,15 +25,22 @@ while(1) {
 
   
   my @vals = split('&',$ret[0]);
+
+  if(!defined $vals[1] || !defined $vals[2] || $vals[1] eq '' || $vals[2] eq '' || $vals[1] eq 'NaN' || $vals[2] eq 'NaN') {sleep 5; next;}
   
   my $value = QA::SciNotation( $vals[1])."V / ".QA::SciNotation( $vals[2])."A";
      $value = "HV is OFF"                   if $vals[1] < 20 || $QA::ItofHvOff == 1;
 
   my $qastate = QA::OK;
-     $qastate = QA::ERROR if $vals[1] < 20;
-     $qastate = QA::NOTE  if $QA::ItofHvOff == 1;
+     $qastate = QA::WARN_2 if $vals[2] >= 0.015;
+     $qastate = QA::ERROR  if $vals[1] <= 29.5;
+     $qastate = QA::ERROR  if $vals[1] >= 30.5;
+     $qastate = QA::NOTE   if $QA::ItofHvOff == 1;
 
   QA::WriteQALog($flog,"hv2","itofhv",30,$qastate,"iTOF HV",$value,"");
 
-  sleep(10);
+  Perl2Epics::Put("voltage",$vals[1]);# if (defined $vals[1] && $vals[1]>=0 && $vals[1] ne 'NaN');
+  Perl2Epics::Put("current",$vals[2]) if (defined $vals[2] && $vals[2]>=0 && $vals[2] ne 'NaN') ;
+  Perl2Epics::Update(0.2);
+  sleep(5);
   }
index 2bf496f38fceda90260528486c4b13ea87bc13c5..879ea395cd9f925a3355e83a7ef84a13c12ba570 100755 (executable)
@@ -60,6 +60,7 @@ while(my $a = <FTRB>) {
     next if ($a =~ /ALL CONNECTIONS FINISHED/);
     
     } 
+ next if ($a =~ /data missing:/);
 #  next if ($a =~ /30 boards complain: Event not found: 3000/);
 #         next if ($a =~ /30 boards complain: frontend not configured: 3000/);
 #         next if ($a =~ /30 boards complain: error: 3000/);
index 60bcaabc6d3803798f306e3b2bb7a266fa854df8..64181da1635d8e2b60a92e4919ea2dd018836a59 100755 (executable)
@@ -4,10 +4,16 @@ use strict;
 use warnings;
 use v5.10.0;
 
-my @cpus = qw |lxhadeb07 lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb13 lxhadeb14 lxhadeb15 lxhadeb16  lxhaddcs05 lxhaddcs06 lxhaddcs11 lxhadesdaq hadesdaq01 hades30 hadesp31 hades33 lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhaddcs05p lxhaddcs06p lxhaddcs11p lxhadesdaqp hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp33 hadesp57 hadesp70|;
+
+my @cpus = qw |
+hades30 hades33 hadesdaq01 hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp31 hadesp33 hadesp57 hadesp63 hadesp66 hadesp70 lxhaddcs05p lxhaddcs06p lxhaddcs10p lxhaddcs11p lxhaddcs12p lxhaddcs13p lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhadesdaqp
+|;
+
+#lxhadeb07 lxhadeb08 lxhadeb09 lxhadeb10 lxhadeb11 lxhadeb12 lxhadeb13 lxhadeb14 lxhadeb15 lxhadeb16  lxhaddcs05 lxhaddcs06 lxhaddcs11 lxhadesdaq hadesdaq01 hades30 ha#desp31 hades33 lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhadeb11p lxhadeb12p lxhadeb13p lxhadeb14p lxhadeb15p lxhadeb16p lxhaddcs05p lxhaddcs06p lxhaddcs11p lxhad#esdaqp hadesdaqp02 hadesdaqp03 hadesdaqp04 hadesp30 hadesp33 hadesp57 hadesp70
 
 for my $cpu (@cpus) {
-    my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f </dev/null >/dev/null&";
-    print "command: $c\n";
-    system($c);
+  my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f </dev/null >/dev/null&";
+  #my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f";
+  print "command: $c\n";
+  system($c);
 }
index fb6ec77f367110966d17d0ef86e6ea1cbc607be5..0c4eaa7cdc0b94fd9835364541cf918d185c1fd0 100755 (executable)
@@ -82,7 +82,7 @@ my $plotScale = {
     entries => 1200,
     type    => HPlot::TYPE_HISTORY,
     output  => HPlot::OUT_PNG,
-    titles  => ["Isobutan Scale0","Isobutan Scale1"],
+    titles  => ["Isobutan Scale1","Isobutan Scale2"],
     xlabel  => "Hour",
     ylabel  => "bottle weight [kg]",
     sizex   => 400,
@@ -106,8 +106,8 @@ Perl2Epics::Connect("IsoPress",$s);
 Perl2Epics::Connect("IsoO2Concentr","HAD:RICH:GAS:concentration:O2:average");
 Perl2Epics::Connect("IsoRefRatio","HAD:RICH:GAS:reflowRatioIsob:average");
 
-Perl2Epics::Connect("IsoScale0","HAD:scale:1:net");
-Perl2Epics::Connect("IsoScale1","HAD:scale:2:net");
+Perl2Epics::Connect("IsoScale1","HAD:scale:1:net");
+Perl2Epics::Connect("IsoScale2","HAD:scale:2:net");
 
 print "Connected.\n";
 
@@ -123,8 +123,8 @@ while(1) {
   my $IsobRefR = $data->{"IsoRefRatio"}->{val};
   my $IsobRefRStr = sprintf("Isobutan reflow ratio: %.1f &#037;",$IsobRefR);
 
-  my $IsobScale0 = $data->{"IsoScale0"}->{val};
   my $IsobScale1 = $data->{"IsoScale1"}->{val};
+  my $IsobScale2 = $data->{"IsoScale2"}->{val};
 
   
   $str = Hmon::MakeTitle(6, 16, "RICH Isobutan", 1, "");
@@ -172,7 +172,7 @@ while(1) {
 
   if( $timer % 4 == 0) {
     $value    = sprintf("%.1f|%.0f|%.0f",$IsobPress,$IsobO2,$IsobRefR);
-    $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale0,$IsobScale1);
+    $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale1,$IsobScale2);
     QA::WriteQALog($flog,"rich","isob",30,$qastate,"Gas".($QA::RichGasOff?" OFF":""),$value,$longtext);
   }
 
@@ -191,9 +191,9 @@ while(1) {
 
   }
 
-  if ( $timer % 240 == 0) {
-    HPlot::PlotAdd('RichIsobScale',$IsobScale0,0);
-    HPlot::PlotAdd('RichIsobScale',$IsobScale1,1);
+  if ( $timer % 180 == 0) {
+    HPlot::PlotAdd('RichIsobScale',$IsobScale1,0);
+    HPlot::PlotAdd('RichIsobScale',$IsobScale2,1);
     HPlot::PlotDraw('RichIsobScale');
   }  
     
index 1cd1c18b55dcd100ee551d8a633a9a996e9f786f..bc74caacb47af78c6e41e5dc13af08e238ec483b 100755 (executable)
@@ -100,7 +100,6 @@ Hmon::WriteFile("MicroSpillStructure",$str);
 
 trb_init_ports() or die trb_strerror();
 
-trb_register_write(0xffff,0xb805,200000); #50000 = 1s offset to spill start
 
 my $round = 0;
 while(1) {
@@ -146,6 +145,9 @@ while(1) {
   $o = trb_register_read(0xf3c0,0xb806);
   if($o->{0xf3c0} == 3) {
     $o = trb_register_read_mem(0xf3c0,0xb811,1,6000) or print trb_strerror() or sleep 5 and next;
+  
+    trb_register_write(0xffff,0xb805,200000); #50000 = 1s offset to spill start
+    trb_register_write(0xffff,0xb804,0x00003559); #Only  5000/5001 as source
 
     
     foreach my $b (keys %$o) {
index fcfdaa59096e729c3eb745c9e64f998102991726..1188c834e062091136b3f189b52e5a060c9ffd8d 100755 (executable)
@@ -45,13 +45,13 @@ mkdir -p `pwd`/pion
 
 #pkill -f "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics"
 fusermount -u qa
-sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics `pwd`/qa
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/pics `pwd`/qa"
 fusermount -u vertex
-sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb22/vertex/pics `pwd`/vertex
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp66:/home/hades-qa/online/5.34.38/feb22/vertex/pics `pwd`/vertex"
 
 #pkill -f "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal"
 fusermount -u calibration
-sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal `pwd`/calibration
+timeout 2 bash -c "sshfs -o allow_other hadaq@hadesp63:/home/hadaq/local/tdcmon/dabc/cal `pwd`/calibration"
 
 
 echo "  <Hmon>     Linking files to server..."
index bbf8ffa074dcaa62f8e4fcf95b176695e793711a..2f30c7383cb1ef4775d2f20701a8602868e20fbc 100644 (file)
@@ -9,7 +9,7 @@ body {
 
 body>div>div {
   float:left;
-  margin: 0px 3px 0px 0;
+  margin: 0px 2px 0px 0;
   padding: 0 0 10px 0 ;
   border: 1px solid #777;
   border-width:0 1px 1px 1px;