如何用PHP获得Windows平均负载?

时间:2011-03-24 17:24:46

标签: php wmi

我想通过php网站显示我的Windows服务器的平均负载..

我该怎么办? Windows上有正常运行时间的端口吗?我怎样才能从php调用正确的WMI调用?

由于

2 个答案:

答案 0 :(得分:1)

Windows上的PHP平均负载:

<?php
     echo system('typeperf "\Processor(*)\% Processor Time"');
?>

答案 1 :(得分:-2)

也许this是你要找的?或至少关于你的Windows正常运行时间问题的答案。

修改

或者你发现更多here,只是建议你。

修改

有关平均加载时间的建议:sys_getloadavg