Преглед изворни кода

Rollback to top command for task list using PID as matching string for grep.

Fixed the original command by using PID as matching string so it is compatible with other languages than English.
DieFeM пре 7 година
родитељ
комит
e4986ffabe
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      modules/status/include/task.php

+ 1 - 1
modules/status/include/task.php

@@ -39,7 +39,7 @@ if( isset($_GET['remote_server_id']) && $_GET['remote_server_id'] != "webhost")
 	}else{
 	}else{
 		if($os == "linux"){
 		if($os == "linux"){
 			$taskoutput = array();
 			$taskoutput = array();
-			$taskoutput["task"] = shell_exec ('ps -p $(ps --no-headers -a -o tty,pid|grep ^[^?] | awk -vORS=, \'{ print $2 }\' | sed \'s/,$/\n/\') -o comm,etime,%cpu,%mem,args');
+			$taskoutput["task"] = shell_exec ("top -b -c -i -w512 -n2 -o+%CPU | awk '/^top/{i++}i==2' | grep 'PID' -A 30");
 		}
 		}
 	}
 	}
 }
 }