The total usage of cpu is less than 100%

81 views
Skip to first unread message

Wenbo Zhang

unread,
Dec 3, 2021, 6:22:17 AM12/3/21
to Prometheus Users
Hi Team,

I found from grafana's panel, the total usage of cpu is less than 100%, you can see it from: 


the metrics is:
sum(irate(node_cpu_seconds_total{instance="$host"}[30s])) by (mode) * 100 / count(node_cpu_seconds_total{instance="$host"}) by (mode)

But the command top shows the right cpu usage.

The whole info looks below: 

Host operating system: output of uname -a

4.18.0-305.10.2.el8_4.x86_64

node_exporter version: output of node_exporter --version

node_exporter, version 0.17.0 (branch: HEAD, revision: f6f6194)
build user: root@322511e06ced
build date: 20181130-15:51:33
go version: go1.11.2

node_exporter command line flags
#!/bin/bash set -e EXPORTER_BIN=bin/node_exporter/node_exporter if [ ! -f $EXPORTER_BIN ]; then EXPORTER_BIN=bin/node_exporter fi exec $EXPORTER_BIN \ --web.listen-address=":9100" \ --collector.tcpstat \ --collector.systemd \ --collector.mountstats \ --collector.meminfo_numa \ --collector.interrupts \ --collector.buddyinfo \ --collector.vmstat.fields="^.*" \ --log.level="info"
Are you running node_exporter in Docker?

No

What did you do that produced an error?

the metrics is:
sum(irate(node_cpu_seconds_total{instance="$host"}[30s])) by (mode) * 100 / count(node_cpu_seconds_total{instance="$host"}) by (mode)

Nothing, just run some workload.

What did you expect to see?

The total usage of cpu should be 100%

What did you see instead?

Add these usage, we get the total cpu usage is 89% < 100%. I ran top command in a terminal, top's result is currect.


Best regards,

Wenbo

Jiancong Ling

unread,
Feb 9, 2023, 12:30:39 AM2/9/23
to Prometheus Users
I have the same problem, do you figure out the answer? thanks

Jiancong Ling

unread,
Feb 9, 2023, 12:30:46 AM2/9/23
to Prometheus Users
I have the same problem, did you get the answer? thanks

On Friday, December 3, 2021 at 7:22:17 PM UTC+8 zhang...@pingcap.com wrote:
Reply all
Reply to author
Forward
0 new messages