Diff for /loncom/loncron between versions 1.49 and 1.50

version 1.49, 2004/05/11 21:08:55 version 1.50, 2004/05/11 21:14:23
Line 77  ENDERROUT Line 77  ENDERROUT
 }  }
   
 sub start_daemon {  sub start_daemon {
     my ($fh,$daemon,$pidfile) = @_;      my ($fh,$daemon,$pidfile,$args) = @_;
     my $progname=$daemon;      my $progname=$daemon;
     if ($daemon eq 'lonc' && $ARGV[0] eq 'new') {      if ($daemon eq 'lonc' && $args eq 'new') {
  $progname='loncnew';    $progname='loncnew'; 
  print "new ";   print "new ";
     }      }
Line 103  sub start_daemon { Line 103  sub start_daemon {
 }  }
   
 sub checkon_daemon {  sub checkon_daemon {
     my ($fh,$daemon,$maxsize,$sendusr1)=@_;      my ($fh,$daemon,$maxsize,$sendusr1,$args)=@_;
   
     &log($fh,'<hr /><a name="'.$daemon.'" /><h2>'.$daemon.'</h2><h3>Log</h3><p style="white-space: pre;"><tt>');      &log($fh,'<hr /><a name="'.$daemon.'" /><h2>'.$daemon.'</h2><h3>Log</h3><p style="white-space: pre;"><tt>');
     printf("%-10s ",$daemon);      printf("%-10s ",$daemon);
Line 152  sub checkon_daemon { Line 152  sub checkon_daemon {
     '</font><br>');      '</font><br>');
  &log($fh,"<h3>$daemon not running, trying to start</h3>");   &log($fh,"<h3>$daemon not running, trying to start</h3>");
   
  if (&start_daemon($fh,$daemon,$pidfile)) {   if (&start_daemon($fh,$daemon,$pidfile,$args)) {
     &log($fh,"<h3>$daemon at pid $daemonpid responding</h3>");      &log($fh,"<h3>$daemon at pid $daemonpid responding</h3>");
     $simplestatus{$daemon}='restarted';      $simplestatus{$daemon}='restarted';
     print "started\n";      print "started\n";
Line 161  sub checkon_daemon { Line 161  sub checkon_daemon {
     &log($fh,"<h3>$daemon at pid $daemonpid not responding</h3>");      &log($fh,"<h3>$daemon at pid $daemonpid not responding</h3>");
     &log($fh,"<p>Give it one more try ...</p>");      &log($fh,"<p>Give it one more try ...</p>");
     print " ";      print " ";
     if (&start_daemon($fh,$daemon,$pidfile)) {      if (&start_daemon($fh,$daemon,$pidfile,$args)) {
  &log($fh,"<h3>$daemon at pid $daemonpid responding</h3>");   &log($fh,"<h3>$daemon at pid $daemonpid responding</h3>");
  $simplestatus{$daemon}='restarted';   $simplestatus{$daemon}='restarted';
  print "started\n";   print "started\n";
Line 465  sub test_connections { Line 465  sub test_connections {
     if ($answer eq 'con_lost') {      if ($answer eq 'con_lost') {
  $bad++;   $bad++;
  $warnings++;   $warnings++;
       } else {
    $good++; #self connection
     }      }
  }   }
  if ($answer =~ /con_lost/) { print(" $tryserver down\n"); }   if ($answer =~ /con_lost/) { print(" $tryserver down\n"); }
Line 659  sub main () { Line 661  sub main () {
     if (!$justcheckconnections) {      if (!$justcheckconnections) {
  &checkon_daemon($fh,'lonsql',200000);   &checkon_daemon($fh,'lonsql',200000);
  &checkon_daemon($fh,'lond',40000,1);   &checkon_daemon($fh,'lond',40000,1);
  &checkon_daemon($fh,'lonc',40000,1);   my $args='new';
    if ($oldlonc) { $args = ''; }
    &checkon_daemon($fh,'lonc',40000,1,$args);
  &checkon_daemon($fh,'lonhttpd',40000);   &checkon_daemon($fh,'lonhttpd',40000);
     }      }
     if (!$justcheckdaemons) {      if (!$justcheckdaemons) {

Removed from v.1.49  
changed lines
  Added in v.1.50


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>