I have a program that runs on both Linux and Windows and reports on the loading of the machine. Since this program was originally written for Linux, I want to implement alogorithm calculating Linux boot on Windows.
according to the proc man page:
/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.
I am interested in the first three indicators: loading in the last 1.5 and 15 minutes.
I can’t say that I completely understand the calculation - does the number of processors on the machine take into account? I assume this is true, but it is not described in the manual.
After all, how do you propose implementing this on Windows?
Thanks in adavance.
source
share