分析Windows机器上与Linux / proc / loadavg计算相关的负载

时间:2015-07-27 06:38:24

标签: linux windows performance load

我有一个在Linux和Windows上运行的程序,并报告机器上的负载。由于这个程序最初是为Linux编写的,我想在Windows上实现Linux的负载计算算法。

根据proc man页面:

/proc/loadavg
              The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.  They  are  the
              same  as  the  load average numbers given by uptime(1) and other programs.  The fourth field consists of two numbers separated by a slash (/).  The first of these is the number of currently executing
              kernel scheduling entities (processes, threads); this will be less than or equal to the number of CPUs.  The value after the slash is the number of kernel scheduling entities that currently exist  on
              the system.  The fifth field is the PID of the process that was most recently created on the system.

我对前三个指标感兴趣:在最后的1,5和15分钟内加载。

我不能说我完全理解计算 - 它是否考虑了机器上的处理器数量?我想它确实如此,但手册中没有涉及。

毕竟,您如何建议在Windows上实现此功能?

谢谢你。

0 个答案:

没有答案