Merged
Conversation
0f52f6a to
16ce86d
Compare
jmcarp
commented
Dec 23, 2025
| add_datalink(&log, &mut tracked_links, &kstat_sampler, link) | ||
| .await; | ||
| } | ||
| Message::TrackCpu => { |
Contributor
Author
There was a problem hiding this comment.
I wasn't exactly sure how to handle this. At the moment, we create one target, which checks cpu stats for all cores on the sled, and the core number is a metric field. Alternatively, we could make a target per core, and move the core number to the target. This implementation is a bit simpler, and it matches the approach we take to instrument cpu usage in propolis. But we could switch to a target per core if that makes more sense semantically within oximeter.
Collaborator
There was a problem hiding this comment.
I think the way you have it now is nice.
On sled-agent startup, begin polling physical cpu usage via the `cpu:*:sys:cpu_nsec_*` kstat. We expose this as `sled_cpu:cpu_nsec`, and label samples by cpu micro-state (user, idle, etc.). Part of #9559.
bnaecker
approved these changes
Feb 27, 2026
| add_datalink(&log, &mut tracked_links, &kstat_sampler, link) | ||
| .await; | ||
| } | ||
| Message::TrackCpu => { |
Collaborator
There was a problem hiding this comment.
I think the way you have it now is nice.
16ce86d to
9a62fc5
Compare
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.
On sled-agent startup, begin polling physical cpu usage via the
cpu:*:sys:cpu_nsec_*kstat. We expose this assled_cpu:cpu_nsec, and label samples by cpu micro-state (user, idle, etc.).Part of #9559.