Changeset 2e2419f44f7aa39107636546d87645570b36e6d7

Show
Ignore:
Timestamp:
07/03/08 16:55:06 (6 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1215104106 +0000
git-parent:

[ea8205aa2eae67e54f43bd191da014c75ed24ef7]

git-author:
Mark Harrison <mark@omniti.com> 1215104106 +0000
Message:

Adding some more debugging information, and fixed a bug where it wouldn't
always find the correct process ID.

git-svn-id: https://labs.omniti.com/resmon/trunk@137 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • update/update.pl

    r22ac646 r2e2419f  
    100100    my @procs=grep(/perl (\/opt\/resmon\/|.\/)resmon/, split(/\n/, $psout)); 
    101101    foreach my $proc (@procs) { 
     102        $proc =~ s/^\s//; 
    102103        print "$proc\n" if $debug; 
    103104        my ($pid, $args) = split(/\W/, $proc, 2); 
     105        print "Killing PID:$pid\n" if $debug; 
    104106        kill('HUP', $pid); 
    105107    } 
     
    176178    sleep(3); 
    177179    if (!get_resmon_status()) { 
    178         print STDERR "There is a problem with the update, reverting\n"; 
    179         `$svn update -r $last_rev $resmondir`; 
     180        print STDERR "There is a problem with the update, reverting to "; 
     181        print STDERR "revision $last_rev\n"; 
     182        my $output = `$svn update -r $last_rev $resmondir`; 
     183        print $output if $debug; 
    180184        reload_resmon(); 
    181185        exit 3;