def collect_meminfo(self):
meminfo = psutil.virtual_memory()
memdict = {}
memdict['total'] = meminfo.total/1024
memdict['used'] = meminfo.used/1024
memdict['free'] = meminfo.free/1024
memdict['buffers'] = meminfo.buffers/1024
memdict['cached'] = meminfo.cached/1024
memdict['percent'] = meminfo.percent
#print(output)
#print(memparts)
return memdict
# collect cpu used information and processors information
评论列表
文章目录