Linux 如何判断cpu是否持续偏高
想统计CPU持续偏高的那个点,不知如何来写代码,请大虾们赐教!
[解决办法]
system("top -n 1 | grep Cpu ");然后 统计。
[解决办法]
system("top -n 1 | grep Cpu > file");
open("file");
read()
unlink("file");
发布时间: 2012-09-08 10:48:07 作者: rapoo
Linux 如何判断cpu是否持续偏高
想统计CPU持续偏高的那个点,不知如何来写代码,请大虾们赐教!
[解决办法]
system("top -n 1 | grep Cpu ");然后 统计。
[解决办法]
system("top -n 1 | grep Cpu > file");
open("file");
read()
unlink("file");