Add CPU section to proc plugin documentation (#4704)
Vladimir Kobal committed
Nov 22, 2018 at 01:45 UTC
3efbe640595ce5b5f4b84207d02c33446d370d44
1 file changed
+42
-1
collectors/proc.plugin/README.md
+42
-1
@@ -8,7 +8,7 @@
8
- `/proc/net/stat/nf_conntrack` (connection tracking performance)
9
- `/proc/net/stat/synproxy` (synproxy performance)
10
- `/proc/net/ip_vs/stats` (IPVS connection statistics)
11
- - `/proc/stat` (CPU utilization)
11
+ - `/proc/stat` (CPU utilization and attributes)
12
- `/proc/meminfo` (memory information)
13
- `/proc/vmstat` (system performance)
14
- `/proc/net/rpc/nfsd` (NFS server statistics for both v3 and v4 NFS servers)
@@ -167,6 +167,47 @@ So, to disable performance metrics for all loop devices you could add `performan
167
performance metrics for disks with major 7 = no
168
```
169
170
+## Monitoring CPUs
171
+
172
+The `/proc/stat` module monitors CPU utilization, interrupts, context switches, processes started/running, thermal throttling, frequency, and idle states. It gathers this information from multiple files.
173
+
174
+If more than 50 cores are present in a system then CPU thermal throttling, frequency, and idle state charts are disabled.
175
+
176
+#### configuration
177
+
178
+`keep per core files open` option in the `[plugin:proc:/proc/stat]` configuration section allows reducing the number of file operations on multiple files.
179
+
180
+### CPU frequency
181
+
182
+The module shows the current CPU frequency as set by the `cpufreq` kernel
183
+module.
184
+
185
+**Requirement:**
186
+You need to have `CONFIG_CPU_FREQ` and (optionally) `CONFIG_CPU_FREQ_STAT`
187
+enabled in your kernel.
188
+
189
+`cpufreq` interface provides two different ways of getting the information through `/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq` and `/sys/devices/system/cpu/cpu*/cpufreq/stats/time_in_state` files. The latter is more accurate so it is preferred in the module. `scaling_cur_freq` represents only the current CPU frequency, and doesn't account for any state changes which happen between updates. The module switches back and forth between these two methods if governor is changed.
190
+
191
+It produces one chart with multiple lines (one line per core).
192
+
193
+#### configuration
194
+
195
+`scaling_cur_freq filename to monitor` and `time_in_state filename to monitor` in the `[plugin:proc:/proc/stat]` configuration section
196
+
197
+### CPU idle states
198
+
199
+The module monitors the usage of CPU idle states.
200
+
201
+**Requirement:**
202
+Your kernel needs to have `CONFIG_CPU_IDLE` enabled.
203
+
204
+It produces one stacked chart per CPU, showing the percentage of time spent in
205
+each state.
206
+
207
+#### configuration
208
+
209
+`schedstat filename to monitor`, `cpuidle name filename to monitor`, and `cpuidle time filename to monitor` in the `[plugin:proc:/proc/stat]` configuration section
210
+
211
## Linux Anti-DDoS
212
213
