version 1.63, 2006/01/27 21:27:15
|
version 1.66, 2006/02/06 09:08:56
|
Line 45 my $statusdir="/home/httpd/html/lon-stat
|
Line 45 my $statusdir="/home/httpd/html/lon-stat
|
|
|
# -------------------------------------------------- Non-critical communication |
# -------------------------------------------------- Non-critical communication |
sub reply { |
sub reply { |
my ($cmd,$server)=@_; |
my ($cmd,$server,$hostname)=@_; |
my $peerfile="$perlvar{'lonSockDir'}/$server"; |
my $peerfile="$perlvar{'lonSockDir'}/".$hostname->{$server}; |
my $client=IO::Socket::UNIX->new(Peer =>"$peerfile", |
my $client=IO::Socket::UNIX->new(Peer =>"$peerfile", |
Type => SOCK_STREAM, |
Type => SOCK_STREAM, |
Timeout => 10) |
Timeout => 10) |
or return "con_lost"; |
or return "con_lost"; |
print $client "$cmd\n"; |
print $client "sethost:$server:$cmd\n"; |
my $answer=<$client>; |
my $answer=<$client>; |
chomp($answer); |
chomp($answer); |
if (!$answer) { $answer="con_lost"; } |
if (!$answer) { $answer="con_lost"; } |
Line 486 sub test_connections {
|
Line 486 sub test_connections {
|
foreach my $tryserver (sort(keys(%{$hostname}))) { |
foreach my $tryserver (sort(keys(%{$hostname}))) { |
print("."); |
print("."); |
my $result; |
my $result; |
my $answer=reply("ping",$tryserver); |
my $answer=reply("ping",$tryserver,$hostname); |
if ($answer eq "$tryserver:$perlvar{'lonHostID'}") { |
if ($answer eq "$tryserver:$perlvar{'lonHostID'}") { |
$result="<b>ok</b>"; |
$result="<b>ok</b>"; |
$good++; |
$good++; |
Line 707 sub main () {
|
Line 707 sub main () {
|
} |
} |
my $args='new'; |
my $args='new'; |
if ($oldlonc) { $args = ''; } |
if ($oldlonc) { $args = ''; } |
if ( &checkon_daemon($fh,'lonc',40000,'USR1',$args) eq 'running') { |
&checkon_daemon($fh,'lonc',40000,'USR2',$args); |
&checkon_daemon($fh,'lond',40000,'USR2',$args); |
|
} |
|
&checkon_daemon($fh,'lonhttpd',40000); |
&checkon_daemon($fh,'lonhttpd',40000); |
&checkon_daemon($fh,'lonmemcached',40000); |
&checkon_daemon($fh,'lonmemcached',40000); |
} |
} |