0

The comand dmesg --level=emerg,alert,crit,err lists all error messages with a high severity.

I wondered for monitoring purposes whether the count of messages is somehow exposed in the /proc filesystem. It would be great to give an indication of hardware issues.

2
  • Does it have to be a count, specifically? Whichever monitoring system you're going to put that in, wouldn't it be more useful to have it send the actual error messages directly? Commented Dec 10, 2024 at 13:39
  • I mean that would be great if a count already exists. I'm using telegraf and parsing the whole system log every 10s/60s seems excessive. Telegraf is not really designed as a system log aggregator. So, I wanted to work around this by only submitting a count. Commented Dec 10, 2024 at 18:14

1 Answer 1

1

the count of messages is somehow exposed in the proc filesystem

No, there's nothing like that.

dmesg --level=emerg,alert,crit,err vs "It would be great to give an indication of hardware issues."

Messages under these log levels are not necessarily indicative of hardware issues.

Here's what I get:

Speculative Return Stack Overflow: WARNING: kernel not compiled with MITIGATION_SRSO.
Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
systemd[1]: Failed to find module 'autofs4'
systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
nvidia: loading out-of-tree module taints kernel.

iwlwifi 0000:04:00.0: WRT: Overriding region id 0
iwlwifi 0000:04:00.0: WRT: Overriding region id 1
iwlwifi 0000:04:00.0: WRT: Overriding region id 2
iwlwifi 0000:04:00.0: WRT: Overriding region id 3
iwlwifi 0000:04:00.0: WRT: Overriding region id 4
iwlwifi 0000:04:00.0: WRT: Overriding region id 6
iwlwifi 0000:04:00.0: WRT: Overriding region id 8
iwlwifi 0000:04:00.0: WRT: Overriding region id 9
iwlwifi 0000:04:00.0: WRT: Overriding region id 10
iwlwifi 0000:04:00.0: WRT: Overriding region id 11
iwlwifi 0000:04:00.0: WRT: Overriding region id 15
iwlwifi 0000:04:00.0: WRT: Overriding region id 16
iwlwifi 0000:04:00.0: WRT: Overriding region id 18
iwlwifi 0000:04:00.0: WRT: Overriding region id 19
iwlwifi 0000:04:00.0: WRT: Overriding region id 20
iwlwifi 0000:04:00.0: WRT: Overriding region id 21
iwlwifi 0000:04:00.0: WRT: Overriding region id 28
NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64  565.77  Release Build  (dvs-builder@U16-A21-31-3)  Wed Nov 27 23:09:12 UTC 2024
FAT-fs (nvme0n1p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.
block nvme0n1: No UUID available providing old NGUID
VBoxNetFlt: Successfully started.
VBoxNetAdp: Successfully started.

A warning from the BlueTooth module is the only one that's related to HW.

1
  • Yes, there would be false positives certainly. However it might still give some indication. On my servers the error log is actually empty right now, so any errors written during runtime might be worth investigating. I'm gonna wait a bit before accepting your answer in case someone else knows some helpful interface. Commented Dec 10, 2024 at 13:33

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.