influxdata / influxdata/telegraf

[inputs.turbostat] AMD epyc 7H12 and 9374F and not supported

Open Beginner friendly
#17,956 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

### Relevant telegraf.conf

```toml
[[inputs.turbostat]]
interval = "1s"
```

### Logs from Telegraf

```text
$ ./telegraf --config ../telegraf.conf --debug
2025-11-06T15:17:59Z I! Loading config: ../telegraf.conf
2025-11-06T15:17:59Z I! Starting Telegraf 1.36.3 brought to you by InfluxData the makers of InfluxDB
2025-11-06T15:17:59Z I! Available plugins: 239 inputs, 9 aggregators, 35 processors, 26 parsers, 65 outputs, 6 secret-stores
2025-11-06T15:17:59Z I! Loaded inputs: cpu diskio exec infiniband mem net turbostat
2025-11-06T15:17:59Z I! Loaded aggregators:
2025-11-06T15:17:59Z I! Loaded processors:
2025-11-06T15:17:59Z I! Loaded secretstores:
2025-11-06T15:17:59Z I! Loaded outputs: http
2025-11-06T15:17:59Z I! Tags enabled: host=compute001
2025-11-06T15:17:59Z I! [agent] Config: Interval:1s, Quiet:false, Hostname:"compute001", Flush Interval:10s
2025-11-06T15:17:59Z W! [agent] The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! If you need the current default behavior, please explicitly set the option to 'false'!
2025-11-06T15:17:59Z D! [agent] Initializing plugins
2025-11-06T15:17:59Z D! [agent] Connecting outputs
2025-11-06T15:17:59Z D! [agent] Attempting connection to [outputs.http]
2025-11-06T15:17:59Z D! [agent] Successfully connected to outputs.http
2025-11-06T15:17:59Z D! [agent] Starting service inputs
2025-11-06T15:17:59Z I! [inputs.turbostat] Starting process: turbostat [--quiet --interval 1 --show all]
2025-11-06T15:18:00Z E! [inputs.turbostat] Error in plugin: unable to parse column "l3": strconv.ParseFloat: parsing "-": invalid syntax
2025-11-06T15:18:01Z E! [inputs.turbostat] Error in plugin: unable to parse column "l3": strconv.ParseFloat: parsing "-": invalid syntax
2025-11-06T15:18:02Z D! [outputs.http] Wrote batch of 1000 metrics in 139.663312ms
```

### System info

Telegraf 1.36.3, Fedora Linux 41, kernel 6.13.12-200.fc41.x86_64, turbostat 2025.09.09

### Docker

_No response_

### Steps to reproduce

1. Run AMD EPYC 7H12 or 9374F equipped machine
2. Install `turbostat`
3. Run `telegraf --config telegraf.conf` (same configuration file provided above)

### Expected behavior

I expect no errors as happen in Intel machine (e.g. Intel Xeon Gold 6126).

### Actual behavior

Telegraf reports the following error:
`Error in plugin: unable to parse column "l3": strconv.ParseFloat: parsing "-": invalid syntax`

### Additional info

Software and hardware relevant informations:
```
$ hostnamectl
Static hostname: compute001
Operating System: Fedora Linux 41 (Forty One)
Kernel: Linux 6.13.12-200.fc41.x86_64
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: PowerEdge R6525
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 43 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Vendor ID: AuthenticAMD
Model name: AMD EPYC 7H12 64-Core Processor
CPU family: 23
Model: 49
Thread(s) per core: 1
Core(s) per socket: 64
Socket(s): 2
...
Caches (sum of all):
L1d: 4 MiB (128 instances)
L1i: 4 MiB (128 instances)
L2: 64 MiB (128 instances)
L3: 512 MiB (32 instances)
NUMA:
NUMA node(s): 8
NUMA node0 CPU(s): 0-15
NUMA node1 CPU(s): 16-31
NUMA node2 CPU(s): 32-47
NUMA node3 CPU(s): 48-63
NUMA node4 CPU(s): 64-79
NUMA node5 CPU(s): 80-95
NUMA node6 CPU(s): 96-111
NUMA node7 CPU(s): 112-127
```

`turbostat` output:
```
[root@epyc001 telegraf]# turbostat --quiet -n 1 --show all
usec Time_Of_Day_Seconds Package Die L3 Node Core CPU APIC X2APIC Avg_MHz Busy% Bzy_MHz TSC_MHz IPC IRQ NMI SMI CorWatt PkgWatt
12727 1762443224.073923 - - - - - - - - 1 0.03 2824 2595 0.58 7559 0 0 23.22 180.36
12 1762443224.071485 0 0 0 0 0 0 0 0 5 0.16 2816 2595 0.34 170 0 0 0.17 89.11
5 1762443224.071513 0 0 0 0 1 1 1 1 0 0.02 2866 2595 0.30 40 0 0 0.16
6 1762443224.071531 0 0 0 0 2 2 2 2 1 0.02 2724 2595 0.36 89 0 0 0.16
5 1762443224.071549 0 0 0 0 3 3 3 3 1 0.04 2761 2595 0.33 132 0 0 0.16
7 1762443224.071572 0 0 1 0 4 4 4 4 0 0.01 2915 2595 0.30 11 0 0 0.16
5 1762443224.071591 0 0 1 0 5 5 5 5 0 0.01 2936 2595 0.32 35 0 0 0.16
7 1762443224.071612 0 0 1 0 6 6 6 6 0 0.01 2745 2595 0.33 16 0 0 0.16
```

Unlike Intel, `turbostat` with some AMD machines outputs L3 cache information, reporting the topology. One L3 cache is present on each CCX (group of 4 cores) in the output above. This column, due to its nature, should be considered a Tag and not a Value, since it is explanatory of the machine topology. Currently, they are considered as Tag: `package`, `node`, `die`, `core`, `cpu`, `apic`, `x2apic`. Since L3 is currently considered a value, `inputs.turbostat` is not able to parse the first row of the `turbostat` command, the reason is that L3 is `-` and cannot be parsed as a float.

I checked this on 7H12 and 9374F processors.

Contributor guide

Open the contributing guide

Research direction

Start at the inputs.turbostat plugin's parsing entry point and reproduce the issue with turbostat --quiet -n 1 --show all on an AMD EPYC system. Trace how the L3 column is classified and parsed; done means AMD output with a '-' L3 value produces no parse error and L3 topology is handled as a tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability-sre
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.