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