#!/bin/csh #Specifying dates: # mm/dd # mm/dd/yy yy can be either two digits (like 02, or 99) or four # today # yesterday # any fully spelled out day of the week, interpreted as the # nearest preceding such day #Spedifying times: # hh:mm 24 hour local clock set STARTDATE = $1 set STARTTIME = $2 set ENDDATE = $3 set ENDTIME = $4 # The next 3 lines are a single command (concatenate them!) # The command queries alarms from the ALH cmlog which involve # the DIRC (final grep; removing it gives all alarms) # The severity!='NO_ALARM' condition avoids messages printed # in the cmlog each time a variable goes from an alarm state # to non alarm. cmlogQuery -f "name=='alh' && facility=='Alarm' && severity!='NO_ALARM' && status!='NO_ALARM'" -o "%cmlogTime %facility %device:30%severity:9%status:14%value:10%message " -S $STARTDATE -s $STARTTIME -E $ENDDATE -e $ENDTIME | grep "DRC" # The next 3 lines are a single command (concatenate them!) # The command queries alarms from the ORC cmlog which involve # the DIRC (final perl script provided by Jim Hamilton -- see below) # "name=='DATAFLOW'" should work as well instead of "domain=='ORC'" cmlogQuery -f "domain=='ORC'" -o "%cmlogTime %host:11%name:14%severity:5%text" -S $STARTDATE -s $STARTTIME -E $ENDDATE -e $ENDTIME | DrcOrcAlarmFilter.pl ------------------------------------------ more DrcOrcAlarmFilter.pl #!/usr/local/bin/perl while (<>) { if (/DRC/) { print $_; } if ( / crate (0x[0-9a-f]*)\s/ ) { # Match the DIRC crates print $_ if ($1 & 0x001c0000); } }