Explorar o código

Merge pull request #10 from Zorrototo/patch-2

Noticed that first iteration of top also isn't acurrate...
OwN-3m-All %!s(int64=9) %!d(string=hai) anos
pai
achega
bf25b7df33
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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')