--- loncom/loncron 2006/03/07 20:02:31 1.63.2.2 +++ loncom/loncron 2006/01/27 21:30:53 1.64 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.63.2.2 2006/03/07 20:02:31 albertel Exp $ +# $Id: loncron,v 1.64 2006/01/27 21:30:53 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,13 +45,13 @@ my $statusdir="/home/httpd/html/lon-stat # -------------------------------------------------- Non-critical communication sub reply { - my ($cmd,$server)=@_; - my $peerfile="$perlvar{'lonSockDir'}/$server"; + my ($cmd,$server,$hostname)=@_; + my $peerfile="$perlvar{'lonSockDir'}/".$hostname->{$server}; my $client=IO::Socket::UNIX->new(Peer =>"$peerfile", Type => SOCK_STREAM, Timeout => 10) or return "con_lost"; - print $client "$cmd\n"; + print $client "sethost:$server:$cmd\n"; my $answer=<$client>; chomp($answer); if (!$answer) { $answer="con_lost"; } @@ -486,7 +486,7 @@ sub test_connections { foreach my $tryserver (sort(keys(%{$hostname}))) { print("."); my $result; - my $answer=reply("ping",$tryserver); + my $answer=reply("ping",$tryserver,$hostname); if ($answer eq "$tryserver:$perlvar{'lonHostID'}") { $result="ok"; $good++; @@ -707,7 +707,9 @@ sub main () { } my $args='new'; if ($oldlonc) { $args = ''; } - &checkon_daemon($fh,'lonc',40000,'USR1',$args); + if ( &checkon_daemon($fh,'lonc',40000,'USR1',$args) eq 'running') { + &checkon_daemon($fh,'lond',40000,'USR2',$args); + } &checkon_daemon($fh,'lonhttpd',40000); &checkon_daemon($fh,'lonmemcached',40000); }