![]() * Add perf plugin skeleton * Initialize events * Collect data * Configure default counters * Add charts for hardware and software counters * Add charts for cache counters * Don't show zeroes for non-existent metrics * Reinit events when stalled * Do not reinit disabled events * Update the documentation * Scale values when multiplexing is happening |
||
---|---|---|
.. | ||
Makefile.am | ||
perf_plugin.c | ||
README.md |
perf.plugin
perf.plugin
collects system-wide CPU performance statistics from Performance Monitoring Units (PMU) using
the perf_event_open()
system call.
Important Notes
Accessing hardware PMUs requires root permissions, so the plugin is setuid to root.
Keep in mind that the number of PMUs in a system is usually quite limited and every hardware monitoring event for every CPU core needs a separate file descriptor to be opened.
Charts
The plugin provides statistics for general hardware and software performance monitoring events:
Hardware events:
- CPU cycles
- Instructions
- Branch instructions
- Cache operations
- BUS cycles
- Stalled frontend and backend cycles
Software events:
- CPU migrations
- Alignment faults
- Emulation faults
Hardware cache events:
- L1D cache operations
- L1D prefetch cache operations
- L1I cache operations
- LL cache operations
- DTLB cache operations
- ITLB cache operations
- PBU cache operations
Configuration
The plugin is disabled by default because the number of PMUs is usually quite limited and it is not desired to allow Netdata to struggle silently for PMUs, interfering with other performance monitoring software. If you need to enable the perf plugin, edit /etc/netdata/netdata.conf and set:
[plugins]
perf = yes
[plugin:perf]
update every = 1
command options = all
You can use the command options
parameter to pick what data should be collected and which charts should be
displayed. If all
is used, all general performance monitoring counters are probed and corresponding charts
are enabled for the available counters. You can also define a particular set of enabled charts using the
following keywords: cycles
, instructions
, branch
, cache
, bus
, stalled
, migrations
, alighnment
,
emulation
, L1D
, L1D-prefetch
, L1I
, LL
, DTLB
, ITLB
, PBU
.
Debugging
You can run the plugin by hand:
sudo /usr/libexec/netdata/plugins.d/perf.plugin 1 all debug
You will get verbose output on what the plugin does.