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

[procstat] Include information about number of cores #2020

Closed
ghost opened this issue Nov 9, 2016 · 8 comments
Closed

[procstat] Include information about number of cores #2020

ghost opened this issue Nov 9, 2016 · 8 comments
Labels
area/procstat feature request Requests for new plugin and for new features to existing plugins

Comments

@ghost
Copy link

ghost commented Nov 9, 2016

Feature Request

When I use cpu_usage from procstat with a multicore system, cpu percentage can be greater than 100%.
example on a 8core system and a process consuming 2 cpu :

  • on top global cpu reporting with cpu
  • on bottom, cpu reporting for a spécific process that consume 2 cores
    image

Proposal:

Adding information of number of core on the system in order to make a graph with maxi 100% of cpu
image

@sparrc sparrc changed the title [procstat] Adding information about number of cores [procstat] Include information about number of cores Nov 9, 2016
@sparrc sparrc added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Nov 9, 2016
@sparrc sparrc added this to the Future Milestone milestone Nov 9, 2016
@danielnelson danielnelson removed this from the Future Milestone milestone Jun 14, 2017
@KostyaSha
Copy link

KostyaSha commented Feb 13, 2018

The same is must have for load_average devision to get single load variables.
ie. load average 15 means different for different number of cores. And resulted value may show the exact processes queue load.

Any progress for it?

@danielnelson
Copy link
Contributor

It occurs to me that you could get the number of cpus by enabling the cpu plugin and performing a query like this:

show tag values cardinality from "cpu" with key = "cpu" where "cpu" != 'cpu-total' and host = 'myhost';

To do the division in a single query I think you would need ifql. We will probably not add a num cpu field to all measurements with fields that require knowing it to interpret.

@UnAfraid
Copy link

It occurs to me that you could get the number of cpus by enabling the cpu plugin and performing a query like this:

show tag values cardinality from "cpu" with key = "cpu" where "cpu" != 'cpu-total' and host = 'myhost';

To do the division in a single query I think you would need ifql. We will probably not add a num cpu field to all measurements with fields that require knowing it to interpret.

This query worked fine in Grafana/influxdb-cli, but i cannot get it to work in Chronograf, i tried:
SHOW TAG VALUES CARDINALITY FROM "cpu" WITH KEY="cpu" WHERE "cpu" != 'cpu-total' AND "host"=:host: returns no results
SHOW TAG VALUES CARDINALITY FROM "telegraf"."autogen"."cpu" WITH KEY="cpu" WHERE "cpu" != 'cpu-total' AND "host"=:host: returns empty string
SHOW TAG VALUES CARDINALITY ON "telegraf" FROM "cpu" WITH KEY="cpu" WHERE "cpu" != 'cpu-total' AND "host"=:host: returns empty string

What do i do wrong?

@danielnelson
Copy link
Contributor

@UnAfraid I'm not sure what the issue might be, could you open a new issue with Chronograf?

@UnAfraid
Copy link

@UnAfraid I'm not sure what the issue might be, could you open a new issue with Chronograf?

Done: influxdata/chronograf#5237

@glinton glinton added feature request Requests for new plugin and for new features to existing plugins and removed feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Jul 24, 2019
@glinton
Copy link
Contributor

glinton commented Jul 24, 2019

Regarding the original request: would it suffice to add a flag to turn irix mode off (cpu_perc would be divided by float64(runtime.NumCPU()) before setting the cpu_used field)?

@UnAfraid
Copy link

Regarding the original request: would it suffice to add a flag to turn irix mode off (cpu_perc would be divided by float64(runtime.NumCPU()) before setting the cpu_used field)?

That would be lovely

@sjwang90
Copy link
Contributor

Fixed in #6165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/procstat feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

6 participants