怎么用python查询出 进程 CPU使用率 内存使用 句柄数
展开全部
>>> import os
>>> os.system('top')
top - 16:29:37 up 4 days, 5:50, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 190 total, 1 running, 189 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3922836k total, 2526900k used, 1395936k free, 352928k buffers
Swap: 0k total, 0k used, 0k free, 1191424k cached
>>> os.system('top')
top - 16:29:37 up 4 days, 5:50, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 190 total, 1 running, 189 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3922836k total, 2526900k used, 1395936k free, 352928k buffers
Swap: 0k total, 0k used, 0k free, 1191424k cached
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询