Browse Source

修复了一下error_dict全是memory的问题

v2
lxb 4 months ago
parent
commit
fac97ee26d
  1. 8
      client.py
  2. 1
      server_config.json

8
client.py

@ -41,7 +41,7 @@ def get_gpus_info(error_dict):
"process_list": process_list
})
except Exception as e:
error_dict['memory'] = f'{e}'
error_dict['gpu'] = f'{e}'
return result_list
@ -90,7 +90,7 @@ def get_cpu_info(error_dict):
result_dict["core_occupy_list"] = psutil.cpu_percent(interval=None, percpu=True)
except Exception as e:
error_dict['memory'] = f'{e}'
error_dict['cpu'] = f'{e}'
return result_dict
@ -108,7 +108,7 @@ def get_storages_info(error_dict, path_list):
}
result_list.append(tmp_res)
except Exception as e:
error_dict['memory'] = f'{e}'
error_dict['storage'] = f'{e}'
return result_list
@ -161,7 +161,7 @@ def get_networks_info(error_dict):
last_network_stats = current_stats
last_network_time = time.time()
except Exception as e:
error_dict['memory'] = f'{e}'
error_dict['network'] = f'{e}'
return result_list

1
server_config.json

@ -3,7 +3,6 @@
"port": 15002,
"server_list":["76", "174", "233", "222"],
"note_dict":{
"76": "目前该服务器gpu的信息获取有问题,还不清楚是什么情况。大概三月份之后有空再修一下。"
},
"api_name": "api"
}

Loading…
Cancel
Save