Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: Add scxtop #1078

Merged
merged 1 commit into from
Dec 8, 2024
Merged

scripts: Add scxtop #1078

merged 1 commit into from
Dec 8, 2024

Conversation

hodgesds
Copy link
Contributor

@hodgesds hodgesds commented Dec 8, 2024

Add a top like script for schedulers using bpftrace. This can be rewritten in bpf/rust in the future to be a more useful tool.

Output:
2024-12-08-14:10:35

Help menu (h key), which also shows the state of the options:
2024-12-08-13:56:40
Toggle off CPU chart with c:
2024-12-08-14:15:12

When a scheduler is not running a default messages appears:
2024-12-08-14:18:39

This is mostly a proof of concept of what kind of tools could be built as this is really pushing the limits of bpftrace.

Note, this requires a really recent build of bpftrace that has the has_key support. The formatting may not scale well to machines with high CPU counts and is buggy in some places.

Add a top like script for schedulers using bpftrace. This can be
rewritten in bpf/rust in the future to be a more useful tool.

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
@hodgesds hodgesds enabled auto-merge December 8, 2024 19:23
@hodgesds hodgesds added this pull request to the merge queue Dec 8, 2024
Merged via the queue into sched-ext:main with commit 39fc819 Dec 8, 2024
23 checks passed
@hodgesds hodgesds deleted the scxtop branch December 8, 2024 19:51
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.

3 participants