Fixed awk invokation in hung queries check

This commit is contained in:
Alexander Kazakov 2020-01-28 20:21:57 +03:00
parent 6b355aa273
commit cebeae0055

View File

@ -107,7 +107,7 @@ def get_stacktraces(server_pid):
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:
output = subprocess.check_output(cmd, shell=True)
if output: