mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Update network.py
This commit is contained in:
parent
de96bd1be9
commit
cd389f12f6
@ -242,7 +242,7 @@ class _NetworkManager:
|
||||
class NetThroughput(object):
|
||||
def __init__(self, node):
|
||||
try:
|
||||
self.interface = subprocess.check_output("awk '{ print $1 " " $2}' /proc/net/route | head -n 2 | tail -n 1 | awk '{print $1}'", shell=True).strip().decode("utf-8")
|
||||
self.interface = subprocess.check_output("awk '{print $1}' /proc/net/route | head -n 2 | tail -n 1", shell=True).strip().decode("utf-8")
|
||||
except Exception as ex:
|
||||
raise Exception("Cannot get default network interface" + str(ex)) from ex
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user