最新更新:getCPUuse添加进来了
出问题的地方是下面这句话太长
return(str(os.popen("top -n1 | awk '/Cpu\(s\):/ {print $2}'").readline().strip(\25.)))
改成一下两段就好了
res = os.popen("top -n1 | awk '/Cpu\(s\):/ {print $2}'").readline()
return(str(res.strip(\)))
系统输出如下
CPU Temperature = 40.6
CPU Use = 2.4
RAM Total = 253.0 MB
RAM Used = 57.0 MB
RAM Free = 196.0 MB
DISK Total Space = 7.2GB
DISK Used Space = 2.3GB
DISK Used Percentage = 33%
|
|