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

turbostat: missing Skylake Cstates #4123

Open
Wolf480pl opened this issue Jun 18, 2023 · 2 comments
Open

turbostat: missing Skylake Cstates #4123

Wolf480pl opened this issue Jun 18, 2023 · 2 comments

Comments

@Wolf480pl
Copy link
Contributor

Wolf480pl commented Jun 18, 2023

  • Version of collectd: 5.12.0
  • Operating system / distribution: Debian 11
  • Kernel version (if applicable): 5.10.0-20-amd64

Beginning of /proc/cpuinfo:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz

Expected behavior

Turbostat plugin automatically detects, and reports usage for, all Cstates supported by the Intel i3-6100 CPU

Actual behavior

Only thread C0 and C1 are detected.
Eg. write_prometheus output:

# HELP collectd_turbostat_percent write_prometheus plugin: 'turbostat' Type: 'percent', Dstype: 'gauge', Dsname: 'value'
# TYPE collectd_turbostat_percent gauge
collectd_turbostat_percent{turbostat="cpu00",type="c0",instance="redacted"} 0.909267010093825 1687127969866
collectd_turbostat_percent{turbostat="cpu00",type="c1",instance="redacted"} 99.0907329899062 1687127969866
collectd_turbostat_percent{turbostat="cpu01",type="c0",instance="redacted"} 1.02867876108538 1687127969866
collectd_turbostat_percent{turbostat="cpu01",type="c1",instance="redacted"} 98.9713212389146 1687127969866
collectd_turbostat_percent{turbostat="cpu02",type="c0",instance="redacted"} 1.03555693203002 1687127969866
collectd_turbostat_percent{turbostat="cpu02",type="c1",instance="redacted"} 98.96444306797 1687127969866
collectd_turbostat_percent{turbostat="cpu03",type="c0",instance="redacted"} 1.13315045864024 1687127969866
collectd_turbostat_percent{turbostat="cpu03",type="c1",instance="redacted"} 98.8668495413598 1687127969866

I had to set in collectd.conf:

<Plugin turbostat>
  CoreCstates "200" # C3 C6 C7
  PackageCstates "460" # C2 C3 C6 C7 C8
</Plugin>

to get the same package and core Cstates that were reported by powertop(8) and turbostat(8)

Steps to reproduce

  • have a machine with Skylake CPU running Debian 11
  • install collectd from Debian repos
  • enable turbostat plugin in collectd.conf, restart collectd
  • observe lack of any package or core cstates
@eero-t
Copy link
Contributor

eero-t commented Jul 4, 2023

Thanks for reporting this!

However, PR fixing the issue would be welcome. Otherwise it can take a long time until there's a fix for the issue (there are only few active developers, and a lot of plugins).

@Wolf480pl
Copy link
Contributor Author

I don't feel competent enough to modify the code that touches MSRs.
If there was a reviewer who was familiar with Intel CPUs enough to be able to check if I'm not doing something dangerous, or applying my fix to too wide a range of CPUs, then I could send a pull request.

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