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

KernelStats doesn't handle CPU hotplug (discontiguous CPUs) #124

Open
antonblanchard opened this issue Apr 29, 2021 · 2 comments
Open

KernelStats doesn't handle CPU hotplug (discontiguous CPUs) #124

antonblanchard opened this issue Apr 29, 2021 · 2 comments

Comments

@antonblanchard
Copy link

I have a system where CPUs have been hot unplugged:

cpu  2074740 293711 234994 2597681757 257 22230 26383 0 0 0
cpu0 14996 1543 5186 5195036 1 63 1986 0 0 0
cpu4 10653 1590 913 5205455 0 57 116 0 0 0
cpu8 22749 1621 923 5193341 0 69 101 0 0 0
cpu12 24716 1511 1236 5191184 1 67 90 0 0 0

It looks like we assume CPUs are contiguous, and don't have a way to retrieve the CPU IDs.

@antonblanchard
Copy link
Author

Thinking about it some more, I can pull that data from CpuInfo. A bit of extra work to get there though.

@eminence
Copy link
Owner

eminence commented Apr 29, 2021

What if the CpuTime struct included a new field that contained the name of the cpu ("cpu4" for example)? Does that help? Or are you looking for maybe a HashMap instead of a Vec?

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

No branches or pull requests

2 participants