version 1.136, 2003/08/12 19:46:04
|
version 1.138, 2003/08/22 16:07:11
|
Line 652 sub make_new_child {
|
Line 652 sub make_new_child {
|
if ($userinput =~ /^ping/) { |
if ($userinput =~ /^ping/) { |
print $client "$currenthostid\n"; |
print $client "$currenthostid\n"; |
# ------------------------------------------------------------------------ pong |
# ------------------------------------------------------------------------ pong |
} elsif ($userinput =~ /^pong/) { |
}elsif ($userinput =~ /^pong/) { |
my $reply=&reply("ping",$hostid{$clientip}); |
my $reply=&reply("ping",$hostid{$clientip}); |
print $client "$currenthostid:$reply\n"; |
print $client "$currenthostid:$reply\n"; |
# ------------------------------------------------------------------------ ekey |
# ------------------------------------------------------------------------ ekey |
Line 683 sub make_new_child {
|
Line 683 sub make_new_child {
|
} elsif ($userinput =~ /^userload/) { |
} elsif ($userinput =~ /^userload/) { |
my $userloadpercent=&userload(); |
my $userloadpercent=&userload(); |
print $client "$userloadpercent\n"; |
print $client "$userloadpercent\n"; |
|
|
|
# |
|
# Transactions requiring encryption: |
|
# |
# ----------------------------------------------------------------- currentauth |
# ----------------------------------------------------------------- currentauth |
} elsif ($userinput =~ /^currentauth/) { |
} elsif ($userinput =~ /^currentauth/) { |
if ($wasenc==1) { |
if ($wasenc==1) { |
Line 697 sub make_new_child {
|
Line 701 sub make_new_child {
|
} else { |
} else { |
print $client "refused\n"; |
print $client "refused\n"; |
} |
} |
|
#--------------------------------------------------------------------- pushfile |
|
} elsif($userinput =~ /^pushfile/) { |
|
print $client "ok\n"; |
|
#--------------------------------------------------------------------- reinit |
|
} elsif($userinput =~ /^reinit/) { |
|
print $client "ok\n"; |
# ------------------------------------------------------------------------ auth |
# ------------------------------------------------------------------------ auth |
} elsif ($userinput =~ /^auth/) { |
} elsif ($userinput =~ /^auth/) { |
if ($wasenc==1) { |
if ($wasenc==1) { |
Line 2118 sub userload {
|
Line 2128 sub userload {
|
my $curtime=time; |
my $curtime=time; |
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 ($mtime)=(stat($perlvar{'lonIDsDir'}.'/'.$filename))[9]; |
if ($curtime-$atime < 3600) { $numusers++; } |
if ($curtime-$mtime < 3600) { $numusers++; } |
} |
} |
closedir(LONIDS); |
closedir(LONIDS); |
} |
} |