master
yaml 251 lines 9.03 KB
Raw
1 plugin_name: perf.plugin
2 modules:
3 - meta:
4 plugin_name: perf.plugin
5 module_name: perf.plugin
6 monitored_instance:
7 name: CPU performance
8 link: "https://kernel.org/"
9 categories:
10 - data-collection.operating-systems
11 icon_filename: "bolt.svg"
12 related_resources:
13 integrations:
14 list: []
15 info_provided_to_referring_integrations:
16 description: ""
17 keywords:
18 - linux
19 - cpu performance
20 - cpu cache
21 - perf.plugin
22 overview:
23 data_collection:
24 metrics_description: "This collector monitors CPU performance metrics about cycles, instructions, migrations, cache operations and more."
25 method_description: "It uses syscall (2) to open a file descriptor to monitor the perf events."
26 supported_platforms:
27 include:
28 - Linux
29 exclude: []
30 multi_instance: true
31 additional_permissions:
32 description: "It needs setuid to use the necessary syscall to collect perf events. Netdata sets the permission during installation time."
33 default_behavior:
34 auto_detection:
35 description: ""
36 limits:
37 description: ""
38 performance_impact:
39 description: ""
40 setup:
41 prerequisites:
42 list:
43 - title: Install perf plugin
44 description: |
45 If you are [using our official native DEB/RPM packages](/packaging/installer/UPDATE.md#determine-which-installation-method-you-used), make sure the `netdata-plugin-perf` package is installed.
46 - title: Enable the perf plugin
47 description: |
48 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.
49
50 To enable it, use `edit-config` from the Netdata [config directory](/docs/netdata-agent/configuration/README.md), which is typically at `/etc/netdata`, to edit the `netdata.conf` file.
51
52 ```bash
53 cd /etc/netdata # Replace this path with your Netdata config directory, if different
54 sudo ./edit-config netdata.conf
55 ```
56
57 Change the value of the `perf` setting to `yes` in the `[plugins]` section. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](/docs/netdata-agent/start-stop-restart.md) for your system.
58 configuration:
59 file:
60 name: "netdata.conf"
61 section_name: "[plugin:perf]"
62 description: "The main netdata configuration file."
63 options:
64 description: |
65 You can get the available options running:
66
67 ```bash
68 /usr/libexec/netdata/plugins.d/perf.plugin --help
69 ````
70 folding:
71 title: "Config options"
72 enabled: true
73 list:
74 - name: update every
75 description: Data collection frequency.
76 default_value: 1
77 required: false
78 - name: command options
79 description: Command options that specify charts shown by the plugin. `cycles`, `instructions`, `branch`, `cache`, `bus`, `stalled`, `migrations`, `alignment`, `emulation`, `L1D`, `L1D-prefetch`, `L1I`, `LL`, `DTLB`, `ITLB`, `PBU`.
80 default_value: 1
81 required: true
82 examples:
83 folding:
84 enabled: true
85 title: "Config"
86 list:
87 - name: All metrics
88 folding:
89 enabled: false
90 description: Monitor all metrics available.
91 config: |
92 [plugin:perf]
93 command options = all
94 - name: CPU cycles
95 description: Monitor CPU cycles.
96 config: |
97 [plugin:perf]
98 command options = cycles
99 troubleshooting:
100 problems:
101 list:
102 - name: Debug Mode
103 description: |
104 You can run `perf.plugin` with the debug option enabled to troubleshoot issues with it. The output should give you clues as to why the collector isn't working.
105
106 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
107
108 ```bash
109 cd /usr/libexec/netdata/plugins.d/
110 ```
111
112 - Switch to the `netdata` user.
113
114 ```bash
115 sudo -u netdata -s
116 ```
117
118 - Run the `perf.plugin` in debug mode:
119
120 ```bash
121 ./perf.plugin 1 all debug
122 ```
123 alerts: []
124 metrics:
125 folding:
126 title: Metrics
127 enabled: false
128 description: ""
129 availability: []
130 scopes:
131 - name: global
132 description: "These metrics refer to the entire monitored application."
133 labels: []
134 metrics:
135 - name: perf.cpu_cycles
136 description: CPU cycles
137 unit: "cycles/s"
138 chart_type: line
139 dimensions:
140 - name: cpu
141 - name: ref_cpu
142 - name: perf.instructions
143 description: Instructions
144 unit: "instructions/s"
145 chart_type: line
146 dimensions:
147 - name: instructions
148 - name: perf.instructions_per_cycle
149 description: Instructions per Cycle(IPC)
150 unit: "instructions/cycle"
151 chart_type: line
152 dimensions:
153 - name: ipc
154 - name: perf.branch_instructions
155 description: Branch instructions
156 unit: "instructions/s"
157 chart_type: line
158 dimensions:
159 - name: instructions
160 - name: misses
161 - name: perf.cache
162 description: Cache operations
163 unit: "operations/s"
164 chart_type: line
165 dimensions:
166 - name: references
167 - name: misses
168 - name: perf.bus_cycles
169 description: Bus cycles
170 unit: "cycles/s"
171 chart_type: line
172 dimensions:
173 - name: bus
174 - name: perf.stalled_cycles
175 description: Stalled frontend and backend cycles
176 unit: "cycles/s"
177 chart_type: line
178 dimensions:
179 - name: frontend
180 - name: backend
181 - name: perf.migrations
182 description: CPU migrations
183 unit: "migrations"
184 chart_type: line
185 dimensions:
186 - name: migrations
187 - name: perf.alignment_faults
188 description: Alignment faults
189 unit: "faults"
190 chart_type: line
191 dimensions:
192 - name: faults
193 - name: perf.emulation_faults
194 description: Emulation faults
195 unit: "faults"
196 chart_type: line
197 dimensions:
198 - name: faults
199 - name: perf.l1d_cache
200 description: L1D cache operations
201 unit: "events/s"
202 chart_type: line
203 dimensions:
204 - name: read_access
205 - name: read_misses
206 - name: write_access
207 - name: write_misses
208 - name: perf.l1d_cache_prefetch
209 description: L1D prefetch cache operations
210 unit: "prefetches/s"
211 chart_type: line
212 dimensions:
213 - name: prefetches
214 - name: perf.l1i_cache
215 description: L1I cache operations
216 unit: "events/s"
217 chart_type: line
218 dimensions:
219 - name: read_access
220 - name: read_misses
221 - name: perf.ll_cache
222 description: LL cache operations
223 unit: "events/s"
224 chart_type: line
225 dimensions:
226 - name: read_access
227 - name: read_misses
228 - name: write_access
229 - name: write_misses
230 - name: perf.dtlb_cache
231 description: DTLB cache operations
232 unit: "events/s"
233 chart_type: line
234 dimensions:
235 - name: read_access
236 - name: read_misses
237 - name: write_access
238 - name: write_misses
239 - name: perf.itlb_cache
240 description: ITLB cache operations
241 unit: "events/s"
242 chart_type: line
243 dimensions:
244 - name: read_access
245 - name: read_misses
246 - name: perf.pbu_cache
247 description: PBU cache operations
248 unit: "events/s"
249 chart_type: line
250 dimensions:
251 - name: read_access