turbostat plugin¶
| Plugin name | turbostat |
| Type | read |
| Callbacks | config, init, read |
| Status | supported |
| Since | 5.5 |
| Copyright | 2013 Len Brown |
| License | GPLv2 |
| Configuration | collectd.conf(5) |
The Turbostat plugin reads CPU frequency and C-state residency on modern Intel turbo-capable processors. The plugin is based on 'turbostat' tool of the Linux kernel.
Synopsis¶
<Plugin turbostat>
#None of the following option should be set manually
#This plugin automatically detect most optimal options
#Only set values here if:
#- The module asks you to
#- You want to disable the collection of some data
#- Your (Intel) CPU is not supported (yet) by the module
#- The module generates a lot of errors 'MSR offset 0x... read failed'
#In the last two cases, please open a bug request
TCCActivationTemp "100"
CoreCstates "392"
PackageCstates "396"
SystemManagementInterrupt true
DigitalTemperatureSensor true
PackageThermalManagement true
RunningAveragePowerLimit "7"
</Plugin>
Example graphs¶
Here are examples of produced data (using CGP).
Example 1 (Small load):
Example 2: (Big compilation near the end):
Dependencies¶
- libcap-devel
Configuration¶
Configuration options · from collectd.conf(5)
See this section in the full configuration reference
The Turbostat plugin reads CPU frequency and C-state residency on modern Intel processors by using Model Specific Registers.
- CoreCstates Bitmask(Integer)
-
Bit mask of the list of core C-states supported by the processor. This option should only be used if the automated detection fails. Default value extracted from the CPU model and family.
Currently supported C-states (by this plugin): 3, 6, 7
Example:
- PackageCstates Bitmask(Integer)
-
Bit mask of the list of packages C-states supported by the processor. This option should only be used if the automated detection fails. Default value extracted from the CPU model and family.
Currently supported C-states (by this plugin): 2, 3, 6, 7, 8, 9, 10
Example:
- SystemManagementInterrupt true|false
- Boolean enabling the collection of the I/O System-Management Interrupt counter. This option should only be used if the automated detection fails or if you want to disable this feature.
- DigitalTemperatureSensor true|false
- Boolean enabling the collection of the temperature of each core. This option should only be used if the automated detection fails or if you want to disable this feature.
- TCCActivationTemp Temperature
- Thermal Control Circuit Activation Temperature of the installed CPU. This temperature is used when collecting the temperature of cores or packages. This option should only be used if the automated detection fails. Default value extracted from MSR_IA32_TEMPERATURE_TARGET.
- RunningAveragePowerLimit Bitmask(Integer)
-
Bit mask of the list of elements to be thermally monitored. This option should only be used if the automated detection fails or if you want to disable some collections. The different bits of this bit mask accepted by this plugin are:
- 0 ('1'): Package
- 1 ('2'): DRAM
- 2 ('4'): Cores
- 3 ('8'): Embedded graphic device
- LogicalCoreNames true|false
- Boolean enabling the use of logical core numbering for per core statistics. When enabled,
cpuE<ltnE<gt>> is used as plugin instance, where n is a dynamic number assigned by the kernel. Otherwise,coreE<ltnE<gt>> is used if there is only one package andpkgE<ltnE<gt>-coreE<lt>mE<gt>> if there is more than one, where n is the n-th core of package m. - RestoreAffinityPolicy AllCPUs|Restore
-
Reading data from CPU has side-effect: collectd process's CPU affinity mask changes. After reading data is completed, affinity mask needs to be restored. This option allows to set restore policy.
AllCPUs (the default): Restore the affinity by setting affinity to any/all CPUs.
Restore: Save affinity using sched_getaffinity() before reading data and restore it after.
On some systems, sched_getaffinity() will fail due to inconsistency of the CPU set size between userspace and kernel. In these cases plugin will detect the unsuccessful call and fail with an error, preventing data collection. Most of configurations does not need to save affinity as Collectd process is allowed to run on any/all available CPUs.
If you need to save and restore affinity and get errors like 'Unable to save the CPU affinity', setting 'possible_cpus' kernel boot option may also help.
See following links for details:
https://github.com/collectd/collectd/issues/1593 https://sourceware.org/bugzilla/show_bug.cgi?id=15630 https://bugzilla.kernel.org/show_bug.cgi?id=151821