日期:2014-05-16  浏览次数:20658 次

Linux 如何判断cpu是否持续偏高
想统计CPU持续偏高的那个点,不知如何来写代码,请大虾们赐教!

------解决方案--------------------
system("top -n 1 | grep Cpu ");然后 统计。
------解决方案--------------------
system("top -n 1 | grep Cpu > file"); 
open("file");
read()
unlink("file");