Skip to content

Commit

Permalink
Dump per-cpu fields for system when --detail is set (facebookincu…
Browse files Browse the repository at this point in the history
…bator#10)

For `--detail` and `--everything`, `below dump system...` shows aggregated view over all the CPUs. The change is to show per-CPU details when queried with `--detail` or `--everything` flag.

Before:
```openmetrics
# TYPE system_cpu_softirq_pct gauge
system_cpu_softirq_pct{cpu="-1",hostname="ip-172-31-24-129"} 0 1696365681
# TYPE system_cpu_softirq_pct gauge
system_cpu_softirq_pct{cpu="-1",hostname="ip-172-31-24-129"} 0 1696365685
```

After:
```openmetrics
# TYPE system_cpus_0_softirq_pct gauge
system_cpus_0_softirq_pct{cpu="0",hostname="ip-172-31-24-129"} 0 1696365580
# TYPE system_cpus_1_softirq_pct gauge
system_cpus_1_softirq_pct{cpu="1",hostname="ip-172-31-24-129"} 0.199203187250996 1696365580
# TYPE system_cpus_0_softirq_pct gauge
system_cpus_0_softirq_pct{cpu="0",hostname="ip-172-31-24-129"} 0 1696365585
# TYPE system_cpus_1_softirq_pct gauge
system_cpus_1_softirq_pct{cpu="1",hostname="ip-172-31-24-129"} 0 1696365585
```
  • Loading branch information
mmynk authored Oct 4, 2023
1 parent 0ad19fc commit c4d0164
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 152 deletions.
Loading

0 comments on commit c4d0164

Please sign in to comment.