Skip to content

Add resctrlfs package - #862

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
rtreffer:resctrlfs
Aug 27, 2026
Merged

Add resctrlfs package#862
SuperQ merged 1 commit into
prometheus:masterfrom
rtreffer:resctrlfs

Conversation

@rtreffer

@rtreffer rtreffer commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Parse the monitoring data of the resctrl filesystem, the kernel interface to Intel RDT, AMD PQoS and ARM MPAM. All vendors share the same driver and file layout, so one parser serves all vendors.

MonData returns the per domain counters of the root control group (llc_occupancy, mbm_total_bytes, mbm_local_bytes). A counter is nil when the hardware lacks the feature or reports "Unavailable". L3MonInfo exposes the monitoring capabilities from info/L3_MON.

This patch only adds read support for monitoring data.

Signed-off-by: René Treffer treffer@measite.de

Reviewers

AI disclosure: This code was written with the help of AI.
I did read through the code and everything looks as expected.

I have tested this with a new node_exporter collector (resctrl).

Parse the monitoring data of the resctrl filesystem, the kernel
interface to Intel RDT, AMD PQoS and ARM MPAM. All vendors share the
same driver and file layout, so one parser serves all vendors.

MonData returns the per domain counters of the root control group
(llc_occupancy, mbm_total_bytes, mbm_local_bytes). A counter is nil
when the hardware lacks the feature or reports "Unavailable".
L3MonInfo exposes the monitoring capabilities from info/L3_MON.

This patch only adds read support for monitoring data.

Signed-off-by: René Treffer <treffer@measite.de>
@rtreffer
rtreffer marked this pull request as ready for review August 26, 2026 14:01

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit.

Dealing with Unavailable is tricky. But I think returning nil is fine.

@SuperQ
SuperQ merged commit a87803e into prometheus:master Aug 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants