This commit is contained in:
parent
d32f766095
commit
bae393196c
|
@ -37,6 +37,14 @@ def get_platform_info():
|
||||||
info["mem_free"] = m.group(2)
|
info["mem_free"] = m.group(2)
|
||||||
info["mem_used"] = m.group(3)
|
info["mem_used"] = m.group(3)
|
||||||
|
|
||||||
|
#硬盘使用
|
||||||
|
out = get_execute_out('df -h')
|
||||||
|
m = re.match(r'\/dev\/vda1\s+?(.+?)G\s+(.+?)G\s+(.+?)G', out)
|
||||||
|
if m:
|
||||||
|
info['disk_total'] = m.group(1)
|
||||||
|
info['disk_used'] = m.group(2)
|
||||||
|
info['disk_freed'] = m.group(3)
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
return {'up_time': '20:52', 'tasks': '127', 'cpu_us': '1.6', 'cpu_sy': '1.6', 'cpu_id': '96.9', 'mem_total': '12134268', 'mem_free': '5648868', 'mem_used': '4537556'}
|
return {'up_time': '20:52', 'tasks': '127', 'cpu_us': '1.6', 'cpu_sy': '1.6', 'cpu_id': '96.9', 'mem_total': '12134268', 'mem_free': '5648868', 'mem_used': '4537556'}
|
||||||
|
|
Loading…
Reference in New Issue