--- loncom/loncron 2004/05/11 19:15:03 1.47
+++ loncom/loncron 2004/05/11 20:19:46 1.48
@@ -2,7 +2,7 @@
# Housekeeping program, started by cron, loncontrol and loncron.pl
#
-# $Id: loncron,v 1.47 2004/05/11 19:15:03 albertel Exp $
+# $Id: loncron,v 1.48 2004/05/11 20:19:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -28,13 +28,14 @@
#
$|=1;
+use strict;
use lib '/home/httpd/lib/perl/';
use LONCAPA::Configuration;
use IO::File;
use IO::Socket;
-use strict;
+use HTML::Entities;
#globals
use vars qw (%perlvar %simplestatus $errors $warnings $notices $totalcount);
@@ -66,11 +67,11 @@ sub log {
sub errout {
my $fh=shift;
&log($fh,(<
+ ");
+ &log($fh," Seems like it started ... ");
+ &log($fh," Seems like that did not work! ');
printf("%-10s ",$daemon);
if (-e "$perlvar{'lonDaemons'}/logs/$daemon.log"){
open (DFH,"tail -n25 $perlvar{'lonDaemons'}/logs/$daemon.log|");
@@ -115,7 +116,7 @@ sub checkon_daemon {
};
close (DFH);
}
- &log($fh,"
+
ENDERROUT
}
@@ -84,7 +85,7 @@ sub start_daemon {
system("$perlvar{'lonDaemons'}/$progname 2>>$perlvar{'lonDaemons'}/logs/${daemon}_errors");
sleep 2;
if (-e $pidfile) {
- &log($fh,"Seems like it started ...
Notices $notices Warnings $warnings
- Errors $errors '.$daemon.'
Log
');
+ &log($fh,'
");
+ &log($fh,"'.$daemon.'
Log
"); + &log($fh,"
Give it one more try ...
"); print " "; if (&start_daemon($fh,$daemon,$pidfile)) { &log($fh,""); + &log($fh,"
Unable to start $daemon
"); } } @@ -181,7 +182,7 @@ sub checkon_daemon { if ($line=~/CRITICAL/) { $notices++; } }; close (DFH); - &log($fh,""); + &log($fh,""); } } @@ -193,7 +194,7 @@ sub checkon_daemon { $blksize,$blocks)=stat($fname); if ($size>$maxsize) { - &log($fh,"Rotating logs ..."); + &log($fh,"
Rotating logs ...
"); rename("$fname.2","$fname.3"); rename("$fname.1","$fname.2"); rename("$fname","$fname.1"); @@ -205,7 +206,7 @@ sub checkon_daemon { # --------------------------------------------------------------------- Machine sub log_machine_info { my ($fh)=@_; - &log($fh,'