/[pdpsoft]/trunk/nl.nikhef.ndpf.tools/nagios-ndpf-sensors/scripts/check_wms_active_jobs
ViewVC logotype

Diff of /trunk/nl.nikhef.ndpf.tools/nagios-ndpf-sensors/scripts/check_wms_active_jobs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2613 by ronalds, Tue Mar 19 10:44:14 2013 UTC revision 2614 by ronalds, Tue Mar 19 15:26:59 2013 UTC
# Line 43  alarm($TIMEOUT); Line 43  alarm($TIMEOUT);
43  # output of queryDb  # output of queryDb
44  #  #
45    
46  my @job_states = ( "REGISTERED", "IDLE", "RUNNING", "REALLY-RUNNING" );  my @job_states = ( "REGISTERED", "PENDING", "IDLE", "RUNNING", "REALLY-RUNNING", "UNKNOWN" );
47    
48  my $cmd = "$QUERY_DB -vS -s " . join( ",", @job_states );  my $cmd = "$QUERY_DB -vS -s " . join( ",", @job_states );
49  if ( ! open QRY, "$cmd | " ) {  if ( ! open QRY, "$cmd | " ) {
# Line 53  if ( ! open QRY, "$cmd | " ) { Line 53  if ( ! open QRY, "$cmd | " ) {
53    
54  my %state_count;  my %state_count;
55  while ( <QRY> ) {  while ( <QRY> ) {
56      if ( /^.(\w+).$/ ) {      if ( /^[\[](.+)[\]]$/ ) {
57          $state_count{$1}++;          $state_count{$1}++;
58      }      }
59  }  }

Legend:
Removed from v.2613  
changed lines
  Added in v.2614

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28