Repository navigation
pcm-sensor-server: export CXL counters when only one socket is visible - #1063
Merged
opcm merged 1 commit intoNov 13, 2026
Merged
Conversation
The Prometheus printer emitted the CXL counters together with the UPI/QPI counters, and only when two or more sockets were visible. A two-socket platform with UPI disabled exposes one socket to the OS, so no CXL_* metrics were exported although PCM detected the CXL units. Also print the section when a socket has CXL ports. With no UPI links the link loop runs zero times, so one-socket systems without CXL are unchanged and one-socket systems with CXL only gain the CXL counters. The JSON printer already prints this section unconditionally. Fixes intel#1061
opcm
approved these changes
Nov 13, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change enabling Prometheus CXL counters on single-socket servers.
No open issues 🎉
What changed in this PR
Fixes #1061 by allowing the Prometheus exporter to emit CXL counters on servers with only one visible socket, including systems with UPI disabled.
Changes:
- Checks for CXL ports across visible sockets before deciding whether to print system counters.
- Preserves existing behavior for multi-socket servers and single-socket systems without CXL; JSON output is unchanged.
| File | Description |
|---|---|
| src/pcm-sensor-server.cpp | Allows the Prometheus system-counter section when CXL ports are present, regardless of socket count. |
Review effort: Balanced
Contributor
|
thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1061
Problem
The Prometheus printer emitted the CXL counters together with the UPI/QPI counters, and only when two or more sockets were visible:
On a two-socket platform with UPI disabled, the OS and PCM see one socket, so no
CXL_*metrics were exported although PCM detected the CXL units at startup ("6 CXL units detected").Change
Also print the section when a socket has CXL ports:
CXL_*counters. With no UPI links the link loop runs zero times, so no*_Link_*metrics are added.Testing
Built current master and ran
pcm-sensor-server -r -silenton a Xeon 6787P (Granite Rapids) with a CXL Type 3 device and UPI disabled (one visible socket):CXL_*lines in/metrics.CXL_Read_Mem,CXL_Read_Cache,CXL_Write_Mem,CXL_Write_Cacheexported forsocket="0", and no*_Link_*metrics.