aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDaniel Hodges <hodges@uber.com>2020-02-20 05:36:33 -0500
committerGitHub <noreply@github.com>2020-02-20 11:36:33 +0100
commitec6214138801d80045e916479a1f8297c40de8e3 (patch)
treec71787ad5060284be50ebce5e6445d587304ddeb /README.md
parentb40954dce598577413d93ce32cc005b57c6371bb (diff)
downloadprometheus_node_collector-ec6214138801d80045e916479a1f8297c40de8e3.tar.bz2
prometheus_node_collector-ec6214138801d80045e916479a1f8297c40de8e3.tar.xz
prometheus_node_collector-ec6214138801d80045e916479a1f8297c40de8e3.zip
Fix num cpu (#1561)
* add a map of profilers to CPUids `runtime.NumCPU()` returns the number of CPUs that the process can run on. This number does not necessarily correlate to CPU ids if the affinity mask of the process is set. This change maintains the current behavior as default, but also allows the user to specify a range of CPUids to use instead. The CPU id is stored as the value of a map keyed on the profiler object's address. Signed-off-by: Joe Damato <jdamato@fastly.com> Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com> Signed-off-by: Daniel Hodges <hodges@uber.com> Co-authored-by: jdamato-fsly <55214354+jdamato-fsly@users.noreply.github.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0a0f7c3..73a3449 100644
--- a/README.md
+++ b/README.md
@@ -84,6 +84,18 @@ Depending on the configured value different metrics will be available, for most
84cases `0` will provide the most complete set. For more information see [`man 2 84cases `0` will provide the most complete set. For more information see [`man 2
85perf_event_open`](http://man7.org/linux/man-pages/man2/perf_event_open.2.html). 85perf_event_open`](http://man7.org/linux/man-pages/man2/perf_event_open.2.html).
86 86
87By default, the perf collector will only collect metrics of the CPUs that
88`node_exporter` is running on (ie
89[`runtime.NumCPU`](https://golang.org/pkg/runtime/#NumCPU). If this is
90insufficient (e.g. if you run `node_exporter` with its CPU affinity set to
91specific CPUs) You can specify a list of alternate CPUs by using the
92`--collector.perf.cpus` flag. For example, to collect metrics on CPUs 2-6, you
93would specify: `--collector.perf --collector.perf.cpus=2-6`. The CPU
94configuration is zero indexed and can also take a stride value
95`--collector.perf --collector.perf.cpus=1-10:5`, would collect on CPUs
961, 5, and 10.
97
98
87Name | Description | OS 99Name | Description | OS
88---------|-------------|---- 100---------|-------------|----
89buddyinfo | Exposes statistics of memory fragments as reported by /proc/buddyinfo. | Linux 101buddyinfo | Exposes statistics of memory fragments as reported by /proc/buddyinfo. | Linux