From: hadaq@countinghouse Date: Fri, 15 Aug 2014 14:58:06 +0000 (+0200) Subject: added sequencer monitor to QA X-Git-Tag: pre2018~68 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b5b5f9550373f1ee16628715d43fa35ee30ece3e;p=hadesdaq.git added sequencer monitor to QA --- diff --git a/hmon/QA.pm b/hmon/QA.pm index d05ee3b..8cb7bb4 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -32,7 +32,7 @@ our $entries->{'cats'} = ["main", ]; # Order of entries in each cat -$entries->{'main'} = ['time', 'rate','onlineqa','up']; +$entries->{'main'} = ['time', 'rate','onlineqa','up','speech']; $entries->{'daq'} = ['trbnet', 'timeouts', 'busy','readout']; $entries->{'trg'} = ['spill', 'accepted', 'source','pt1rate', 'start']; #, $entries->{'rate'} = ['pt1','start','hodo','pion1','pion2']; @@ -41,8 +41,8 @@ $entries->{'eb'} = ['run', 'rate','bytes', 'lostevt', 'errbits']; $entries->{'mdc'} = ['token', 'blocked', 'temp', 'linkqual', 'voltage']; $entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other']; $entries->{'feeerr'} = ['rich', 'trb', 'feeerr','trginp','trgqual']; -$entries->{'other'} = ['magnet','speech','rich','shower','mdcinvalid']; $entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling']; +$entries->{'other'} = ['magnet','rich','shower','mdcinvalid','sequencer']; our $QAServer = "hades33"; diff --git a/hmon/doc/main-speech.htt b/hmon/doc/main-speech.htt new file mode 100644 index 0000000..b0a88fb --- /dev/null +++ b/hmon/doc/main-speech.htt @@ -0,0 +1,11 @@ +

Speech Output

+

+This button shows the status of the speech deamon which gives you accustic informations in case of critical problems +with any subsystem. + +

Error Handling if the button is not Green

+ +It can only be switched off. If that is the case, turn it on. + + + diff --git a/hmon/doc/other-sequencer.htt b/hmon/doc/other-sequencer.htt new file mode 100644 index 0000000..892de8e --- /dev/null +++ b/hmon/doc/other-sequencer.htt @@ -0,0 +1,6 @@ +

EPICS HV Sequencer

+ +

Some high voltage control is not working any more. Please inform the MDC operator before taking any action. +

Error Handling

+

Click the 'Restart Sequencer' button in the control window or run on lxhadeb06: +

ssh scs@lxhadeb06 'echo -en "\x18" | netcat -w 1 localhost 4813
\ No newline at end of file diff --git a/hmon/hmon_mdc_temp.pl b/hmon/hmon_mdc_temp.pl index c00d553..5631056 100755 --- a/hmon/hmon_mdc_temp.pl +++ b/hmon/hmon_mdc_temp.pl @@ -23,11 +23,12 @@ my $values = {}; my $color = {}; my $raw = {}; my $val; +my $mailerrstatecnt = 0; my ($max,$min,$avg,$mean); trb_init_ports() or die trb_strerror(); -Perl2Epics::Connect("TempP2S","HAD:MDC:P2:S1:M1:temp"); +#Perl2Epics::Connect("TempP2S","HAD:MDC:P2:S1:M1:temp"); while (1) { my $rh_mdc_temp; @@ -73,5 +74,12 @@ while (1) { "Max. temperature in each plane of MDC are " . $str); $store = {}; + if($qastate >= QA::ERROR) { + if($mailerrstatecnt++ >= 30) { + Hmon::SendEmail('j.michel@gsi.de,c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high: \n$str"); + $mailerrstatecnt = 0; + } + } + sleep 20; } diff --git a/hmon/permanent/hmon_sequencer.pl b/hmon/permanent/hmon_sequencer.pl new file mode 100755 index 0000000..914abca --- /dev/null +++ b/hmon/permanent/hmon_sequencer.pl @@ -0,0 +1,129 @@ +#!/usr/bin/perl -w +use strict; +use warnings; + +use FileHandle; +use Data::Dumper; +use Hmon; +use QA; +use List::Util qw(min max); +use Perl2Epics; + +my @names; +my @variables = qw( + +HAD:TOFHV:G1:status:alive:roc:average +HAD:TOFHV:G2:status:alive:roc:average +HAD:TOFHV:G3:status:alive:roc:average +HAD:TOFHV:G4:status:alive:roc:average +HAD:TOFHV:G5:status:alive:roc:average +HAD:TOFHV:G6:status:alive:roc:average +HAD:FWHV:G7:status:alive:roc:average +HAD:RPCHV:G8:status:alive:roc:average +HAD:RPCHV:G9:status:alive:roc:average +HAD:RICH:HV:G25:status:alive:roc:average +HAD:SHWR:HV:G26:status:alive:roc:average +HAD:SHWR:HV:G27:status:alive:roc:average +HAD:SHWR:HV:G28:status:alive:roc:average +HAD:SHWR:HV:G29:status:alive:roc:average +HAD:SHWR:HV:G30:status:alive:roc:average +HAD:SHWR:HV:G31:status:alive:roc:average +HAD:RICH:HV:G32:status:alive:roc:average +HAD:MDC:HV:G41:status:alive:roc:average +HAD:MDC:HV:G42:status:alive:roc:average +HAD:MDC:HV:G43:status:alive:roc:average +HAD:MDC:HV:G44:status:alive:roc:average +HAD:MDC:HV:G4011:status:alive:roc:average +HAD:MDC:HV:G4012:status:alive:roc:average +HAD:MDC:HV:G4013:status:alive:roc:average +HAD:MDC:HV:G4014:status:alive:roc:average +HAD:MDC:HV:G4015:status:alive:roc:average +HAD:MDC:HV:G4016:status:alive:roc:average +HAD:MDC:HV:G4021:status:alive:roc:average +HAD:MDC:HV:G4022:status:alive:roc:average +HAD:MDC:HV:G4023:status:alive:roc:average +HAD:MDC:HV:G4024:status:alive:roc:average +HAD:MDC:HV:G4025:status:alive:roc:average +HAD:MDC:HV:G4026:status:alive:roc:average +HAD:MDC:HV:G4031:status:alive:roc:average +HAD:MDC:HV:G4032:status:alive:roc:average +HAD:MDC:HV:G4033:status:alive:roc:average +HAD:MDC:HV:G4034:status:alive:roc:average +HAD:MDC:HV:G4035:status:alive:roc:average +HAD:MDC:HV:G4036:status:alive:roc:average +HAD:MDC:HV:G4041:status:alive:roc:average +HAD:MDC:HV:G4042:status:alive:roc:average +HAD:MDC:HV:G4043:status:alive:roc:average +HAD:MDC:HV:G4044:status:alive:roc:average +HAD:MDC:HV:G4045:status:alive:roc:average +HAD:MDC:HV:G4046:status:alive:roc:average +HAD:MDC:HV:P1:S1:TRIP:status:alive:roc:average +HAD:MDC:HV:P1:S2:TRIP:status:alive:roc:average +HAD:MDC:HV:P1:S3:TRIP:status:alive:roc:average +HAD:MDC:HV:P1:S4:TRIP:status:alive:roc:average +HAD:MDC:HV:P1:S5:TRIP:status:alive:roc:average +HAD:MDC:HV:P1:S6:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S1:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S2:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S3:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S4:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S5:TRIP:status:alive:roc:average +HAD:MDC:HV:P2:S6:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S1:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S2:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S3:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S4:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S5:TRIP:status:alive:roc:average +HAD:MDC:HV:P3:S6:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S1:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S2:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S3:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S4:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S5:TRIP:status:alive:roc:average +HAD:MDC:HV:P4:S6:TRIP:status:alive:roc:average +HAD:MDC:TEMP:TempLV:status:alive:roc:average +); + +# HAD:MDC:HV:Ind1:TRIP:status:alive:roc:average +# HAD:MDC:HV:Ind2:TRIP:status:alive:roc:average +# HAD:MDC:HV:Ind3:TRIP:status:alive:roc:average +# HAD:MDC:HV:Ind4:TRIP:status:alive:roc:average + +my $flog = QA::OpenQAFile(); + +for my $v (@variables) { + my $name = $v; + $name =~ s/:status:alive:roc:average//; + push(@names,$name); + Perl2Epics::Connect($name,$v); + } + + + +while(1) { + my $qastate = QA::OK; + my $count = 0; + my $longtxt = ""; + my $data = Perl2Epics::GetAll(); + + for my $v (@names) { + next if $data->{$v}->{val} < 0; + if($data->{$v}->{val} < 0.5) { + $qastate = max($qastate,QA::FATAL); + $longtxt .= "$v stopped, "; + $count++; + } +# elsif($data->{$v}->{val} < 0.95) { +# $qastate = max($qastate,QA::WARN); +# $longtxt .= "$v strange, "; +# $count++; +# } + } + + $longtxt = "All sequencers running" if $longtxt eq ""; + my $value = ((scalar @names)-$count)."/".(scalar @names); + QA::WriteQALog($flog,"other","sequencer",20,$qastate,"HV Sequencer",$value,$longtxt); + + sleep(10); + } + diff --git a/hmon/speakdaemon.pl b/hmon/speakdaemon.pl index 344f70d..d4fd4b8 100755 --- a/hmon/speakdaemon.pl +++ b/hmon/speakdaemon.pl @@ -32,11 +32,11 @@ if($f) { else { while(1) { if($inhibit == 0) { - QA::WriteQALog($fq, "other", "speech", 120, QA::OK, + QA::WriteQALog($fq, "main", "speech", 120, QA::OK, "Speech Output", "running", "The speech daemon is running."); } else { - QA::WriteQALog($fq, "other", "speech", 120, QA::WARN, + QA::WriteQALog($fq, "main", "speech", 120, QA::WARN, "Speech Output", "muted", "The speech daemon is muted."); } sleep 60;