mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #8063 from Akazz/tests/better_server_pid_detection
Improved getting ClickHouse server pid in clickhouse-test
This commit is contained in:
commit
a73975d6a3
@ -107,7 +107,7 @@ def get_stacktraces(server_pid):
|
||||
|
||||
|
||||
def get_server_pid(server_tcp_port):
|
||||
cmd = "lsof -i tcp:{port} | grep '*:{port}'".format(port=server_tcp_port)
|
||||
cmd = "lsof -i tcp:{port} | fgrep 'TCP *:{port} (LISTEN)'".format(port=server_tcp_port)
|
||||
try:
|
||||
output = subprocess.check_output(cmd, shell=True)
|
||||
if output:
|
||||
|
Loading…
Reference in New Issue
Block a user