version 1.367, 2003/05/02 15:26:36
|
version 1.369, 2003/05/08 21:35:48
|
Line 347 sub delenv {
|
Line 347 sub delenv {
|
return 'ok'; |
return 'ok'; |
} |
} |
|
|
|
# ------------------------------------------ Find out current server userload |
|
# there is a copy in lond |
|
sub userload { |
|
my $numusers=0; |
|
{ |
|
opendir(LONIDS,$perlvar{'lonIDsDir'}); |
|
my $filename; |
|
my $curtime=time; |
|
while ($filename=readdir(LONIDS)) { |
|
if ($filename eq '.' || $filename eq '..') {next;} |
|
my ($atime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[8]; |
|
if ($curtime-$atime < 3600) { $num_users++; } |
|
} |
|
closedir(LONIDS); |
|
} |
|
my $userloadpercent=0; |
|
my $maxuserload=$perlvar{'lonUserLoadLim'}; |
|
if ($maxuserload) { |
|
$userloadpercent=100*$num_users/$maxuserload; |
|
} |
|
return $userloadpercent; |
|
} |
|
|
# ------------------------------------------ Fight off request when overloaded |
# ------------------------------------------ Fight off request when overloaded |
|
|
sub overloaderror { |
sub overloaderror { |
Line 3763 sub numval {
|
Line 3786 sub numval {
|
return int($txt); |
return int($txt); |
} |
} |
|
|
|
sub latest_rnd_algorithm_id { |
|
return '64bit'; |
|
} |
|
|
sub rndseed { |
sub rndseed { |
my ($symb,$courseid,$domain,$username)=@_; |
my ($symb,$courseid,$domain,$username)=@_; |
|
|