Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU currentLoad completly off on windows #900

Open
ColorsCrypt opened this issue Mar 31, 2024 · 2 comments
Open

CPU currentLoad completly off on windows #900

ColorsCrypt opened this issue Mar 31, 2024 · 2 comments

Comments

@ColorsCrypt
Copy link

Describe the bug
When calling the currentLoad() function the currentLoad value is completly off. I checked task manager and it says 42% load while the currentLoad value I get is ~6.134.

I understand that there can be a difference but it shouldn't be that much off.

To Reproduce
Code I used:

setInterval(() => {
    getSystemInfo();
}, 1000) // tried also 5s, 10s, even 30s with same result

async function getSystemInfo() {
    try {
        const cpu = await si.currentLoad()
        //console.log(cpu)

        const cpuInfo = {
            cpuLoad: cpu.currentLoad
        };
        console.log(cpuInfo)
    } catch (error) {
        logger.error('Error:', error);
    }
}

Current Output

{ cpuLoad: 3.5504885993485344 }
{ cpuLoad: 2.9962546816479403 }
{ cpuLoad: 3.4767528284746883 }
{ cpuLoad: 3.116947884631369 }
{ cpuLoad: 3.8537064310260187 }
{ cpuLoad: 2.844856103208733 }
{ cpuLoad: 2.9877998174122333 }
{ cpuLoad: 6.137479541734861 }

Environment (please complete the following information):

  • systeminformation package version: 5.22.6
  • OS: [e.g. macOS] Windows
  • Hardware [e.g. MacBook Pro 13] AMD Ryzen 5 3600 6-Core Processor

To get all needed environment information, please run the following command:

  npx systeminformation info

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│  SYSTEMINFORMATION                                                      Version: 5.22.6 │
└─────────────────────────────────────────────────────────────────────────────────────────┘

Operating System:
──────────────────────────────────────────────────────────────────────────────────────────
Platform         : Windows
Distro           : Microsoft Windows 11 Pro
Release          : 10.0.22631
Codename         :
Kernel           : 10.0.22631
Arch             : x64
Hostname         : DESKTOP-8O4DG3J
Codepage         : 850
Build            : 22631
Hypervisor       : true
RemoteSession    :

System:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : Micro-Star International Co., Ltd
Model            : MS-7B86
Version          : 2.0
Virtual          :

CPU:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer     : AMD
Brand            : Ryzen 5 3600 6-Core Processor
Family           : 23
Model            : 113
Stepping         : 0
Speed            : 3.6
Cores            : 12
PhysicalCores    : 6
PerformanceCores : 12
EfficiencyCores  :
Processors       : 1
Socket           : AM4
@ColorsCrypt
Copy link
Author

ColorsCrypt commented Apr 28, 2024

@sebhildebrandt Do you have any updates on this?
I found out that scaling the output with *9 or *10 provides way closer results (downside is sometimes this produces values above 100)

@strukteon
Copy link

I am having the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants