摘要: # -*- coding:utf-8 -*- - import os, time last_worktime=0 last_idletime=0 def get_cpu(): global last_worktime, last_idletime f=open("/proc/stat","r") l 阅读全文
posted @ 2021-12-16 15:42 test_yu 阅读(63) 评论(0) 推荐(0) 编辑
摘要: #pip install psutil import psutil import os,datetime,time def getMemCpu(): data = psutil.virtual_memory() total = data.total #总内存,单位为byte free = data. 阅读全文
posted @ 2021-12-16 15:40 test_yu 阅读(141) 评论(0) 推荐(0) 编辑