From: hadaq@countinghouse Date: Tue, 19 Aug 2014 19:07:20 +0000 (+0200) Subject: temperature alarm e-mail, cw X-Git-Tag: pre2018~66 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=930c81ea579655f8b8d93e1d432548c125e3547a;p=hadesdaq.git temperature alarm e-mail, cw --- diff --git a/hmon/hmon_mdc_temp.pl b/hmon/hmon_mdc_temp.pl index 5631056..c065f1a 100755 --- a/hmon/hmon_mdc_temp.pl +++ b/hmon/hmon_mdc_temp.pl @@ -7,6 +7,7 @@ use FileHandle; use Data::Dumper; use POSIX qw/floor ceil/; use List::Util 'max'; +use Perl2Epics; use QA; use Hmon; @@ -28,7 +29,12 @@ my ($max,$min,$avg,$mean); trb_init_ports() or die trb_strerror(); -#Perl2Epics::Connect("TempP2S","HAD:MDC:P2:S1:M1:temp"); +Perl2Epics::Connect("TempAlarmEPICS","HAD:MDC:TEMP:TempLV:alarm"); +my $data = Perl2Epics::GetAll(); + +#print Dumper $data; +#print $data->{'TempAlarmEPICS'}->{'val'} . "\n"; +#exit; while (1) { my $rh_mdc_temp; @@ -74,9 +80,9 @@ while (1) { "Max. temperature in each plane of MDC are " . $str); $store = {}; - if($qastate >= QA::ERROR) { + if($qastate >= QA::ERROR || ( $data->{'TempAlarmEPICS'}->{'val'} > 0 ) ) { 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"); + Hmon::SendEmail('c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high: \n$str"); $mailerrstatecnt = 0; } }