From: Will Budicm Date: Thu, 10 Dec 2020 13:01:17 +0000 (+1100) Subject: Status wasn't logging, fixed. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=2d1c6902822ced950265f19b39a37d23102a2be8;p=LifeLog.git Status wasn't logging, fixed. --- diff --git a/htdocs/cgi-bin/stats.cgi b/htdocs/cgi-bin/stats.cgi index c731cbc..358769c 100755 --- a/htdocs/cgi-bin/stats.cgi +++ b/htdocs/cgi-bin/stats.cgi @@ -67,7 +67,6 @@ my $CSS=<header(-expires=>"+6os", -charset=>"UTF-8"); print $cgi->start_html(-title => "Log Data Stats", -BGCOLOR=>Settings::bgcol(), -script=> [{-type => 'text/javascript', -src => 'wsrc/main.js'}, @@ -124,6 +123,9 @@ my $hardware_status = "Host: $hst
".join("\t", map { defined ? $_ : '' $hardware_status =~ s/Memory:/
Memory: <\/b>/g; $hardware_status =~ s/up\s/Server is up: <\/b>/g; +my $log = "".$hardware_status.""."
\n".`df -h -l -x tmpfs`."
"; +Settings::toLog($db, $log); + my $prc = 'ps -eo size,pid,user,command --sort -size | awk \'{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }\''; my $processes = `$prc | sort -u -r -`; my @stat = stat Settings::dbFile(); @@ -174,10 +176,6 @@ print qq( print $cgi->end_html; -$hardware_status = "$hardware_status"."
\n".`df -h -l -x tmpfs`."
"; -Settings::toLog($db, $$hardware_status); - - $db->disconnect(); }