Unverified Commit 04707b09 authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

misc: add hypervisor vendor (#1165)

parent ff2cfdb1
...@@ -170,6 +170,17 @@ def get_gpu_topology(): ...@@ -170,6 +170,17 @@ def get_gpu_topology():
return None return None
def get_hypervisor_vendor():
try:
output = subprocess.check_output(["lscpu"], text=True)
for line in output.split("\n"):
if "Hypervisor vendor:" in line:
return line.split(":")[1].strip()
return None
except:
return None
def check_env(): def check_env():
""" """
Check and print environment information. Check and print environment information.
...@@ -184,6 +195,10 @@ def check_env(): ...@@ -184,6 +195,10 @@ def check_env():
if gpu_topo: if gpu_topo:
env_info["NVIDIA Topology"] = gpu_topo env_info["NVIDIA Topology"] = gpu_topo
hypervisor_vendor = get_hypervisor_vendor()
if hypervisor_vendor:
env_info["Hypervisor vendor"] = hypervisor_vendor
ulimit_soft, _ = resource.getrlimit(resource.RLIMIT_NOFILE) ulimit_soft, _ = resource.getrlimit(resource.RLIMIT_NOFILE)
env_info["ulimit soft"] = ulimit_soft env_info["ulimit soft"] = ulimit_soft
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment