prometheus / prometheus/procfs

Add devicetree `serial-number` as fallback for `product_serial` from DMI tables

Open
#691 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
883
Forks
388
Avg merge
13h 28m
Merged PRs (30d)
3

Description

(I am not sure if this better belongs here or node-exporter, feel free to move the issue to the other repo.)

On most ARM devices there are no DMI tables and when using things like u-boot emulating UEFI they are still incomplete. Thus /sys/class/dmi/id/product_serial is not available/empty. Alternatively, however, /sys/firmware/devicetree/base/serial-number is usually available on those devices and also contains a serial number. In case the former does not exists it should fall back to the latter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Go code and tests that read /sys/class/dmi/id/product_serial. Check how missing or empty DMI values are represented, then use /sys/firmware/devicetree/base/serial-number as the fallback case. Done means ARM systems without a usable DMI product serial expose the devicetree serial instead, with tests covering both paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.