mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Fixed awk invokation in hung queries check
This commit is contained in:
parent
6b355aa273
commit
cebeae0055
@ -107,7 +107,7 @@ def get_stacktraces(server_pid):
|
|||||||
|
|
||||||
|
|
||||||
def get_server_pid(server_tcp_port):
|
def get_server_pid(server_tcp_port):
|
||||||
cmd = "lsof -i tcp:{port} -s tcp:LISTEN -Fp | gawk '/^p[0-9]+$/{{print substr($0, 2)}}'".format(port=server_tcp_port)
|
cmd = "lsof -i tcp:{port} -s tcp:LISTEN -Fp | awk '/^p[0-9]+$/{{print substr($0, 2)}}'".format(port=server_tcp_port)
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(cmd, shell=True)
|
output = subprocess.check_output(cmd, shell=True)
|
||||||
if output:
|
if output:
|
||||||
|
Loading…
Reference in New Issue
Block a user