U 改进获取主机扩展信息兼容性

pull/494/head
vapao 2022-05-17 23:23:58 +08:00
parent 64987edf50
commit 8574217191
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ def fetch_host_extend(ssh):
with ssh:
code, out = ssh.exec_command_raw('nproc')
if code != 0:
code, out = ssh.exec_command_raw("grep -c 'model name' /proc/cpuinfo")
code, out = ssh.exec_command_raw("grep -c '^processor' /proc/cpuinfo")
if code == 0:
response['cpu'] = int(out.strip())