Diff for /loncom/lond between versions 1.128 and 1.131

version 1.128, 2003/05/08 21:35:48 version 1.131, 2003/06/16 14:23:56
Line 276  sub checkchildren { Line 276  sub checkchildren {
             alarm(300);              alarm(300);
     &logthis('Child '.$_.' did not respond');      &logthis('Child '.$_.' did not respond');
     kill 9 => $_;      kill 9 => $_;
     $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";      #$emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
     $subj="LON: $currenthostid killed lond process $_";      #$subj="LON: $currenthostid killed lond process $_";
     my $result=`echo 'Killed lond process $_.' | mailto $emailto -s '$subj' > /dev/null`;      #my $result=`echo 'Killed lond process $_.' | mailto $emailto -s '$subj' > /dev/null`;
     $execdir=$perlvar{'lonDaemons'};      #$execdir=$perlvar{'lonDaemons'};
     $result=`/bin/cp $execdir/logs/lond.log $execdir/logs/lond.log.$_`;      #$result=`/bin/cp $execdir/logs/lond.log $execdir/logs/lond.log.$_`;
     alarm(0);      alarm(0);
   }    }
         }          }
Line 2081  sub userload { Line 2081  sub userload {
  while ($filename=readdir(LONIDS)) {   while ($filename=readdir(LONIDS)) {
     if ($filename eq '.' || $filename eq '..') {next;}      if ($filename eq '.' || $filename eq '..') {next;}
     my ($atime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[8];      my ($atime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[8];
     if ($curtime-$atime < 3600) { $num_users++; }      if ($curtime-$atime < 3600) { $numusers++; }
  }   }
  closedir(LONIDS);   closedir(LONIDS);
     }      }
     my $userloadpercent=0;      my $userloadpercent=0;
     my $maxuserload=$perlvar{'lonUserLoadLim'};      my $maxuserload=$perlvar{'lonUserLoadLim'};
     if ($maxuserload) {      if ($maxuserload) {
  $userloadpercent=100*$num_users/$maxuserload;   $userloadpercent=100*$numusers/$maxuserload;
     }      }
       $userloadpercent=sprintf("%.2f",$userloadpercent);
     return $userloadpercent;      return $userloadpercent;
 }  }
   

Removed from v.1.128  
changed lines
  Added in v.1.131


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