...
Name | Description | Comment |
Interval | The interval within which to retrieve statistics on monitored events in seconds | Interval option is supported by collectd and is defined in <LoadPlugin> block. No additional functionality should be developed in intel_pmu plugin to support this option. |
ReportHardwareCacheEvents | Enable/disable monitoring of hardware cache events | |
ReportKernelPMUEvents | Enable/disable monitoring of kernel PMU events | |
ReportSoftwareEvents | Enable/disable monitoring of software vents | |
EventList | Path to hardware events list file for current CPU. | File can be downloaded by event_download.py script which is part of pmu-tools package. |
HardwareEvents | String containing comma separated list of hardware specific events to monitor | |
Cores | Core groups definition. Monitored metrics are reported only for configured cores. If this option is omitted all available cores are monitored. If a group is enclosed in square brackets each core is added individually to a separate group (that is statistics are not aggregated). | Allowed formats: |
DispatchMultiPmu | Enable/disable dispatching of cloned multi PMU for uncore events. If disabled only total sum is dispatched as single event. If enabled separate metric is dispatched for every counter. | Uncore event example: UNC_CHA_DIR_LOOKUP.NO_SNP. If enabled information about event type is added to type_instance, e.g.: "UNC_CHA_DIR_LOOKUP.NO_SNP:type=30". It allows to distinguish between multiple counters for one event. |
Here is an example of the plugin configuration section of collectd.conf file:
...
HWSpecificEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
Cores ""
DispatchMultiPmu false
</Plugin>
Another example with only uncore events set:
<Plugin intel_pmu>
EventList "/var/cache/pmu/GenuineIntel-6-55-uncore.json"
HWSpecificEvents "UNC_CHA_TOR_INSERTS.IA_MISS:config1=0x4043200000000" "UNC_IIO_TXN_REQ_BY_CPU.MEM_WRITE.PART0"
Cores "0" "18"
DispatchMultiPmu false
</Plugin>
Implementation Implementation details
intel_pmu plugin does not introduce its own layer of functionality. It just reads configuration provided by user and prepares all needed parameters/data structures for jevents API. This table shows the correspondence between plugin’s API and jevents API that is used to configure Linux perf monitoring.
...
plugin API | jevents API | Description |
pmu_config | Parse events groups to monitor provided by user in collectd.conf | |
pmu_init | alloc_eventlist | Allocate memory for new eventlist |
resolve_event_extra | Resolve hardware specific events names to perf events (perf_event_attr) | |
jevent_pmu_uncore | Check if event is uncore event | |
jevent_next_pmu | Expand event into multiple PMU if neccessary (in use for uncore events) | |
setup_event | Setup perf events for monitoring | |
pmu_read | read_all_events | Read values of all monitored events |
pmu_shutdown | free_eventlist | Free memory allocated for eventlist (recursively including all events) |
For more details on plugin API see collectd plugin implementation guide https://collectd.org/wiki/index.php/Plugin_architecture.
...
In addition to standard groups of events supported by Linux perf (hardware cache, kernel pmu, software) intel_pmu plugin allows to monitor hardware specific events. To support this functionality plugin will use feature provided by jevents library – resolving symbolic event names using downloaded event files. To be able to use hardware specific event names in configuration file user will have to download events list file for current CPU before using intel_pmu plugin. This can be done using event_download.py script which is part of pmu-tools package.
Note: For uncore events values can be collected only for first core of every socket e.g. '0' '18' etc.
SNMP Support
All metrics collected by intel_pmu plugin should be available through SNMP. This will be achieved by creating proper configuration for snmp_agent collectd plugin. No additional functionality needed in intel_pmu plugin to support SNMP. See description of SNMP feature for more details on snmp_agent plugin.
...