88# ⏱ metrics-process
99
1010This crate provides a [ Prometheus] -style [ process metrics] collector for the
11- [ metrics] crate, supporting Linux, macOS, Windows, FreeBSD, and OpenBSD. The
12- original collector code was manually rewritten in Rust from the official
13- Prometheus client for Go ([ client_golang] ), \* BSD support code was written
14- from scratch.
11+ [ metrics] crate, supporting Linux, macOS, Windows, and FreeBSD. The original
12+ collector code was manually rewritten in Rust from the official Prometheus
13+ client for Go ([ client_golang] ), \* BSD support code was written from scratch.
1514
1615[ Prometheus ] : https://prometheus.io/
1716[ process metrics ] : https://prometheus.io/docs/instrumenting/writing_clientlibs/#process-metrics
@@ -35,29 +34,32 @@ This crate supports the following metrics provided by [Prometheus] for
3534| ` process_threads ` | Number of OS threads in the process. |
3635
3736For each platform, it is equivalent to what the official Prometheus client for
38- Go ([ client_golang] ) provides.
37+ Go ([ client_golang] ) provides. Note that code for OpenBSD exists but is not
38+ tested and we cannot guarantee its correctness.
3939
4040> [ !NOTE]
4141>
42- > Prior to version 2.0.0, the ` process_cpu_seconds_total ` metric was Gauge instead of Counter.
43- > Enable ` use-gauge-on-cpu-seconds-total ` feature to use the previous behavior.
44-
45- | Metric name | Linux | macOS | Windows | FreeBSD | OpenBSD |
46- | ---------------------------------- | ----- | ----- | ------- | ------- | ------- |
47- | ` process_cpu_seconds_total ` | x | x | x | x | x |
48- | ` process_open_fds ` | x | x | x | x | |
49- | ` process_max_fds ` | x | x | x | x | x |
50- | ` process_virtual_memory_bytes ` | x | x | x | x | |
51- | ` process_virtual_memory_max_bytes ` | x | x | | x | |
52- | ` process_resident_memory_bytes ` | x | x | x | x | x |
53- | ` process_heap_bytes ` | | | | | |
54- | ` process_start_time_seconds ` | x | x | x | x | x |
55- | ` process_threads ` | x | x | | x | |
42+ > Prior to version 2.0.0, the ` process_cpu_seconds_total ` metric was Gauge
43+ > instead of Counter. Enable ` use-gauge-on-cpu-seconds-total ` feature to use the
44+ > previous behavior.
45+
46+ | Metric name | Linux | macOS | Windows | FreeBSD | (OpenBSD) |
47+ | ---------------------------------- | ----- | ----- | ------- | ------- | --------- |
48+ | ` process_cpu_seconds_total ` | x | x | x | x | x |
49+ | ` process_open_fds ` | x | x | x | x | |
50+ | ` process_max_fds ` | x | x | x | x | x |
51+ | ` process_virtual_memory_bytes ` | x | x | x | x | |
52+ | ` process_virtual_memory_max_bytes ` | x | x | | x | |
53+ | ` process_resident_memory_bytes ` | x | x | x | x | x |
54+ | ` process_heap_bytes ` | | | | | |
55+ | ` process_start_time_seconds ` | x | x | x | x | x |
56+ | ` process_threads ` | x | x | | x | |
5657
5758> [ !NOTE]
5859>
59- > If you only need to compile this crate on non-supported platforms, you can use the ` dummy ` feature.
60- > Enabling this feature activates a dummy collector, which returns an empty ` Metrics ` .
60+ > If you only need to compile this crate on non-supported platforms, you can use
61+ > the ` dummy ` feature. Enabling this feature activates a dummy collector, which
62+ > returns an empty ` Metrics ` .
6163
6264[ client_golang ] : https://github.com/prometheus/client_golang
6365
0 commit comments