06-14-2023 04:51 AM
@Andrey_Dmitriev wrote:
works like charm in LabVIew 2020 64bit on Windows 11
on a side note: you can use a stacked, not transposed waveform chart to compare the cpu % for each core.
06-14-2023 05:04 AM
With the fix you've posted it works fine on my PC and I started to have the feeling that this solution is equivalent with the one I linked when I created this topic. (its just calling the dll directly not thru the .net nodes)
I'm not sure if its just me but the numbers dont really add up. For me the total CPU usage (displayed in the task manager) should be: sum(proc% for each cores) / number of cores, but the number I get is significantly different than what I see in the task manager.
06-14-2023 05:22 AM
@1984 wrote:
For me the total CPU usage (displayed in the task manager) should be: sum(proc% for each cores) / number of cores, but the number I get is significantly different than what I see in the task manager.
If you would like to get overall utilization, then you should use \Processor(_Total)\% Processor Time performance counter, (of course, you can combine multiple counters if needed) something like that:
hope it helps,
Andrey.
06-14-2023 07:46 AM - edited 06-14-2023 07:47 AM
@1984 wrote:
I'm not sure if its just me but the numbers dont really add up. For me the total CPU usage (displayed in the task manager) should be: sum(proc% for each cores) / number of cores, but the number I get is significantly different than what I see in the task manager.
processor>% processor time includes a built in _Total that you can use for reference
turns out, this built-in total is quite the same as a total from the formula = sum(proc% for each cores) / number of cores
I use the chart in https://forums.ni.com/t5/Example-Code/Performance-Monitor-Using-LabVIEW/ta-p/3501988 to log all processor time values
I used 7-Zip Benchmark to create a reproducable load, which is depicted in my chart and graphs
06-14-2023 10:14 AM
@alexderjuengere wrote:
I used 7-Zip Benchmark to create a reproducable load, which is depicted in my chart and graphs
Why need 7-zip and do not use such a great tool called LabVIEW?
Timed Loops can be assigned to physical CPUs, and at works (well, a little bit tricky if hyperthreading is enabled, but anyway). Another possibility is to use CPUStress from SysInternals, where you can assign affinity mask to individual cores: https://learn.microsoft.com/en-us/sysinternals/downloads/cpustres
06-15-2023 03:54 AM
@Andrey_Dmitriev wrote:Why need 7-zip and do not use such a great tool called LabVIEW?
I probably got lazy 😉
06-15-2023 04:03 AM
turns out, this built-in total is quite the same as a total from the formula = sum(proc% for each cores) / number of cores
Yeah, I've found the _total is practically the same as the formula I used to get the total load on my own.