Skip to contentSkip to conversation

can the idle value of /proc/stat decrease?

DISCUSSION xuqiang (M) 2 participants 2 messages Dec 28, 2020 – Mar 3, 2021 1 message not in the archive VFS

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Our recent test shows that the idle value of /proc/stat can decrease.
Is this an unreported bug? or it has been reported and the solution is waiting to get merged.

The results of the two readings from /proc/stat are shown as below, the interval between the two readings is 150 ms:

cat /proc/stat
cpu0 5536 10 14160 4118960 0 0 227128 0 0 0

cat /proc/stat
cpu0 5536 10 14160 4118959 0 0 227143 0 0 0

#2 lore raw

Hi,

We found the same problem on our production servers.

For example, prometheus-node-exporter reported below message:
daemon.info: Feb 8 17:43:12 ps601b-202 prometheus-node-exporter[2506]: level=warn ts=2021-02-08T17:43:12.052Z caller=cpu_linux.go:247 collector=cpu msg="CPU Idle counter jumped backwards, possible hotplug event, resetting CPU stats" cpu=78 old_value=1.04782328e+06 new_value=1.04782178e+06

The idle value was changed from 1.04782328e+06 to 1.04782178e+06.

AND the server rebooted after some minutes.
There is no other error in the log files.
I currently suspect the CPU counter decreasing caused the system reboot.

Quoted 13 lines · xuqiang (M)

Our recent test shows that the idle value of /proc/stat can decrease. Is this an unreported bug? or it has been reported and the solution is waiting to get merged.

The results of the two readings from /proc/stat are shown as below, the interval between the two readings is 150 ms:

cat /proc/stat
cpu0 5536 10 14160 4118960 0 0 227128 0 0 0

cat /proc/stat
cpu0 5536 10 14160 4118959 0 0 227143 0 0 0

Signature · 30 lines
Gioh Kim

Cloud server kernel maintainer
Quality Management (IONOS Cloud)

1&1 IONOS SE | Greifswalder Str. 207 | 10405 Berlin | Germany
Phone: +49 176 26978962
E-mail: [email protected] | Web: www.ionos.de

Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498

Vorstand: Dr. Christian Böing, Hüseyin Dogan, Dr. Martin Endreß,
Hans-Henning Kettler, Arthur Mai, Matthias Steinberg, Achim Weiß
Aufsichtsratsvorsitzender: Markus Kadelke

Member of United Internet

Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte
Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat
sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie
bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem
bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu
speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch
immer zu verwenden.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient of this e-mail, you are hereby
notified that saving, distribution or use of the content of this
e-mail in any way is prohibited. If you have received this e-mail in
error, please notify the sender and delete the e-mail.