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

[Windows] Error Obtaining the Xeon Gold 6342 CPU usage #2488

Open
17Reset opened this issue Dec 24, 2024 · 0 comments
Open

[Windows] Error Obtaining the Xeon Gold 6342 CPU usage #2488

17Reset opened this issue Dec 24, 2024 · 0 comments

Comments

@17Reset
Copy link

17Reset commented Dec 24, 2024

Summary

  • OS: Windows Server 2025 Datacenter
  • Architecture: 64-bit
  • Psutil version: 6.1.0
  • Python version: Python 3.13.1
  • Type: core

Description

I ran it on this windows server with code like this, and after running it for about a few minutes, I started to get incorrect utilization reports with output of 100 utilization at intervals, which only happened on this multi-core CPU, which is NUMA architecture:

import psutil


def get_cpu_utilization():
    """
    Fetches the CPU utilization using psutil library.

    :return: The average CPU utilization percentage across all cores.
    :rtype: int
    """
    cpu_percent = psutil.cpu_percent(interval=1, percpu=False)

    return cpu_percent


if __name__ == '__main__':
    while True:
        cpu = get_cpu_utilization()
        print(cpu)
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

1 participant