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

Feature Request - Add CPU count to cpu input #1041

Closed
rossmcdonald opened this issue Apr 15, 2016 · 7 comments · Fixed by #1071
Closed

Feature Request - Add CPU count to cpu input #1041

rossmcdonald opened this issue Apr 15, 2016 · 7 comments · Fixed by #1071

Comments

@rossmcdonald
Copy link
Contributor

rossmcdonald commented Apr 15, 2016

Adding a CPU count (the number of CPU's on the system) to the cpu (or maybe system) input would be very helpful when alerting based on system load.

@sparrc
Copy link
Contributor

sparrc commented Apr 20, 2016

will do 👍

@eduser25
Copy link

Guys, I think this implementation is wrong. NumCPU is, defined by go, NumCPU returns the number of logical CPUs usable by the current process.

This is NOT the number of CPUs a system may have.

@jdmaloney
Copy link

How hard would this be to add to the cpu input? I'm trying to figure out how many cores are being used in a given host so I'd like to be able to do usage_user * n_cpu to get that value. With them being in different measurements that isn't possible (without Flux).

@oserde
Copy link
Contributor

oserde commented May 20, 2020

Hi @eduser25 . This behavior was updated in #6214 .

@danielnelson
Copy link
Contributor

@jdmaloney You may want to turn on totalcpu = true.

@jdmaloney
Copy link

@danielnelson I do have that enabled on the system, however if I look at top on a compute node I see the job process is using ~2600% CPU (almost 26 cores), but looking at what I see from the cpu plugin I only get percentages that add up to 100. I don't have a way to tell how many CPU's on a node are engaged from the information in either cpu or system individually. I can from info in both, but I can't multiply n_cpu from the system plugin with usage_user from the cpu plugin since they're in different measurements. Maybe a config parameter that shows aggregate cpu utilization % instead of the average across the cpus? Not sure if that's easier than adding the n_cpu value to the cpu input.
Screen Shot 2020-05-20 at 8 18 29 PM
Screen Shot 2020-05-20 at 8 18 45 PM

@danielnelson
Copy link
Contributor

I might still not be fully understanding, sorry about that ahead of time. If you want something similar to what top is showing here enable report_active = true and then select sum(usage_active) from cpu group by time(10s).

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 a pull request may close this issue.

6 participants