From f30573cb336db2415a885e05de6d8c5b5dca371b Mon Sep 17 00:00:00 2001 From: lxb <1580622474@qq.com> Date: Mon, 17 Mar 2025 21:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80=E4=B8=8Ber?= =?UTF-8?q?ror=5Fdict=E5=85=A8=E6=98=AFmemory=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.py | 8 ++++---- server_config.json | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client.py b/client.py index 2d8f489..299dda7 100644 --- a/client.py +++ b/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 diff --git a/server_config.json b/server_config.json index a5b08f7..2f8d31d 100644 --- a/server_config.json +++ b/server_config.json @@ -3,7 +3,6 @@ "port": 15002, "server_list":["76", "174", "233", "222"], "note_dict":{ - "76": "目前该服务器gpu的信息获取有问题,还不清楚是什么情况。大概三月份之后有空再修一下。" }, "api_name": "api" }