Răsfoiți Sursa

Merge pull request #10 from Zorrototo/patch-2

Noticed that first iteration of top also isn't acurrate...
OwN-3m-All 9 ani în urmă
părinte
comite
bf25b7df33
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      ogp_agent.pl

+ 1 - 1
ogp_agent.pl

@@ -3833,7 +3833,7 @@ sub shell_action
 	elsif($action eq 'get_tasklist')
 	{
 		my %taskList;
-		$taskList{'task'} = encode_base64(`top -b -c -o +%CPU -w512 -n1|grep "COMMAND" -A 30`);
+		$taskList{'task'} = encode_base64(`top -b -c -i -o +%CPU -w512 -n2 | awk '/^top/{i++}i==2' | grep "COMMAND" -A 30`);
 		return {%taskList};
 	}
 	elsif($action eq 'get_timestamp')