Grafana query for top 10 cpu process

  • What Grafana version and what operating system are you using? Linux os , version is 8.1.8

  • What are you trying to achieve?
    I would like build prometheus query for top 10 cpu process . I have host with multi core ( some of them have 8, 4, 23 etc) . I would like build prometheus query for top 10 cpu process . I have host with multi core ( some of them have 8, 4, 23 etc) . but somehow for host who’s having 8 or 23 core, grafana dashboard for percent goes to more than 100 %

  • How are you trying to achieve it?
    Above is way I’m using to achieve

  • What happened?
    Grafana dashboard for percentage goes beyond 100% .

  • What did you expect to happen?

I would like dashboard should not go above 100% irrespective of core.

  • Can you copy/paste the configuration(s) that you are having problems with?

. I’m using below query
" topk (10, (avg (irate(namedprocess_namegroup_cpu_seconds_total{instance=”<>"}[1m]) ) by (groupname) * 100) " It giving partially correct output but as mentioned above for multicore Y axis goes more than 100 %.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No

  • Did you follow any online instructions? If so, what is the URL?
    Prometheus documentation.