On 16/10/2019 15:10, Brad King wrote:
> On 10/16/19 10:05 AM, Wouter Klouwen wrote:
>> Is the intent for CTest to specifically manage CPU load or system load
>> overall?
>
> I don't think a careful distinction was made at the time.
>
> If Linux needs some updates to be consistent with other platforms
> then that would be fine with me.

Unfortunately this may be easier said than done.

Most of the data relevant to this lives in /proc. Indeed the
getloadavg() implementation of glibc merely reads /proc/loadavg*.

For load average the scheduler keeps track of the running 1, 5, 15
minute running averages.

There's /proc/stat which keeps a running total of the CPU usage - the
first lines beginning with `cpu` - but for the purposes of this it is in
the format of usage since boot. In order to replicate a CPU utilisation
only load, you'd effectively have to pick a point in time to start and
then measure since the reference point, which makes things a bit
complicated.

>From the same file you could also take the lines `procs_running` and
`procs_blocked`, sum them and present them as a pseudo load. It would be
a fairly robust calculation. I don't know if this would be quite correct
though.

I might just create an issue for this.

   W


*:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getloadavg.c;hb=HEAD
th

>
> -Brad
>
>
> [External email. Treat hyperlinks and attachments with caution]
>
This transmission contains information that may be confidential and contain 
personal views which are not necessarily those of YouView TV Ltd. YouView TV 
Ltd (Co No:7308805) is a limited liability company registered in England and 
Wales with its registered address at YouView TV Ltd, 3rd Floor, 10 Lower Thames 
Street, London, EC3R 6YT. For details see our web site at http://www.youview.com
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to