diff --git a/tests/rptest/services/redpanda.py b/tests/rptest/services/redpanda.py index 5a7f657eeac3..84df00ab73dd 100644 --- a/tests/rptest/services/redpanda.py +++ b/tests/rptest/services/redpanda.py @@ -1771,7 +1771,7 @@ def redpanda_pid(self, node): # we need to look for redpanda pid. pids() method returns pids of both # nodejs server and redpanda try: - cmd = "ps ax | grep -i 'redpanda' | grep -v grep | grep -v 'version' | awk '{print $1}'" + cmd = "ps ax | grep -i 'redpanda' | grep -v grep | grep -v 'version'| grep -v \"]\" | awk '{print $1}'" for p in node.account.ssh_capture(cmd, allow_fail=True, callback=int):