From daa4a34493618b48a0fbac4685a3e3d71a2d3fcd Mon Sep 17 00:00:00 2001 From: wbudic Date: Sat, 15 Dec 2018 16:01:52 +1100 Subject: [PATCH] Added uptime --- htdocs/cgi-bin/stats.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cgi-bin/stats.cgi b/htdocs/cgi-bin/stats.cgi index 04acdbe..837b2dd 100755 --- a/htdocs/cgi-bin/stats.cgi +++ b/htdocs/cgi-bin/stats.cgi @@ -59,7 +59,7 @@ $stm = 'SELECT sum(ammount) from LOG where date>=date("now","start of year") my $income = sprintf("%.2f",selectSQL($stm)); my $revenue = big_money($income - $expense); -my $hardware_status =`inxi -b -c0`; +my $hardware_status =`inxi -b -c0;uptime -p`; $hardware_status =~ s/\n//g; 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 -`; -- 2.34.1