Diff for /loncom/loncron between versions 1.56 and 1.57

version 1.56, 2005/02/09 20:41:29 version 1.57, 2005/02/14 00:29:48
Line 114  sub checkon_daemon { Line 114  sub checkon_daemon {
     my ($fh,$daemon,$maxsize,$sendusr1,$args)=@_;      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("%-15s ",$daemon);
     if (-e "$perlvar{'lonDaemons'}/logs/$daemon.log"){      if (-e "$perlvar{'lonDaemons'}/logs/$daemon.log"){
  open (DFH,"tail -n25 $perlvar{'lonDaemons'}/logs/$daemon.log|");   open (DFH,"tail -n25 $perlvar{'lonDaemons'}/logs/$daemon.log|");
  while (my $line=<DFH>) {    while (my $line=<DFH>) { 
Line 152  sub checkon_daemon { Line 152  sub checkon_daemon {
     if ($restartflag==1) {      if ($restartflag==1) {
  $simplestatus{$daemon}='off';   $simplestatus{$daemon}='off';
  $errors++;   $errors++;
    my $kadaemon=$daemon;
    if ($kadaemon eq 'lonmemcached') { $kadaemon='memcached'; }
  &log($fh,'<br><font color="red">Killall '.$daemon.': '.   &log($fh,'<br><font color="red">Killall '.$daemon.': '.
     `killall $daemon 2>&1`.' - ');      `killall $kadaemon 2>&1`.' - ');
  sleep 2;   sleep 2;
  &log($fh,unlink($pidfile).' - '.   &log($fh,unlink($pidfile).' - '.
     `killall -9 $daemon 2>&1`.      `killall -9 $kadaemon 2>&1`.
     '</font><br>');      '</font><br>');
  &log($fh,"<h3>$daemon not running, trying to start</h3>");   &log($fh,"<h3>$daemon not running, trying to start</h3>");
   
Line 678  sub main () { Line 680  sub main () {
  if ($oldlonc) { $args = ''; }   if ($oldlonc) { $args = ''; }
  &checkon_daemon($fh,'lonc',40000,1,$args);   &checkon_daemon($fh,'lonc',40000,1,$args);
  &checkon_daemon($fh,'lonhttpd',40000);   &checkon_daemon($fh,'lonhttpd',40000);
    &checkon_daemon($fh,'lonmemcached',40000);
     }      }
     if (!$justcheckdaemons) {      if (!$justcheckdaemons) {
  &test_connections($fh,\%hostname);   &test_connections($fh,\%hostname);

Removed from v.1.56  
changed lines
  Added in v.1.57


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