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

If you offline a CPU throttled won't start #367

Open
travisdowns opened this issue Nov 19, 2024 · 0 comments
Open

If you offline a CPU throttled won't start #367

travisdowns opened this issue Nov 19, 2024 · 0 comments

Comments

@travisdowns
Copy link

I have CPU 6 offline (it's a HT sibling of 0 and I didn't want anything running there), using something like:

echo 0 | sudo tee /sys/devices/system/cpu/cpu6/online

then throttled would fail to start with an error like:

Traceback (most recent call last):
  File "/home/tdowns/dev/throttled/./throttled.py", line 1037, in <module>
    main()
  File "/home/tdowns/dev/throttled/./throttled.py", line 972, in main
    platform_info = get_cpu_platform_info()
  File "/home/tdowns/dev/throttled/./throttled.py", line 327, in get_cpu_platform_info
    features_msr_value = readmsr('MSR_PLATFORM_INFO', cpu=0)
  File "/home/tdowns/dev/throttled/./throttled.py", line 283, in readmsr
    raise e
  File "/home/tdowns/dev/throttled/./throttled.py", line 265, in readmsr
    f = os.open(addr, os.O_RDONLY)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cpu/6/msr'

Not even sure this is worth fixing but I guess the right fix would be to check for which CPUs are online if the msr dir doesn't exist.

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

No branches or pull requests

1 participant