From ceafbb414783b0f01dc174fc8ac5da574d4b825a Mon Sep 17 00:00:00 2001 From: xiaowei <403828237@qq.com> Date: Tue, 15 May 2018 15:54:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- monitor/monitor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/monitor/monitor.py b/monitor/monitor.py index 3efa214..ee4a845 100644 --- a/monitor/monitor.py +++ b/monitor/monitor.py @@ -81,14 +81,15 @@ hostInfo = info['metric'] value=info['value'] hostInfo = OrderedDict(hostInfo) - hostInfo['value']=value[1] + hostInfo['value']=value[1]+"%" disk_content.append(list(hostInfo.values())) +print(disk_content) for info in mem_infos: hostInfo = info['metric'] value=info['value'] hostInfo = OrderedDict(hostInfo) - hostInfo['value']=value[1] + hostInfo['value']=value[1]+"%" mem_content.append(list(hostInfo.values())) for info in gpu_infos: @@ -110,14 +111,14 @@ hostInfo = info['metric'] value=info['value'] hostInfo = OrderedDict(hostInfo) - hostInfo['value']=value[1] + hostInfo['value']=value[1]+"GB" network_receive_content.append(list(hostInfo.values())) for info in network_transmit_infos: hostInfo = info['metric'] value=info['value'] hostInfo = OrderedDict(hostInfo) - hostInfo['value']=value[1] + hostInfo['value']=value[1]+"GB" network_transmit_content.append(list(hostInfo.values())) print("正在导出disk信息....")