You are not logged in.

#1 2025-01-12 21:11:55

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Send email to administrator when a stack trace error happens

Hi to all,
I'd like to know if it is possible to setup any service that send by email the stack trace (or the output of journalctl -b 0) when it appears in the dmesg (I'm referring to the messages included between [cut here] messages in dmesg).
Sometimes I get some random errors even though the system works correctly when they appear.

Offline

#2 2025-01-13 08:42:07

gromit
Administrator
From: Germany
Registered: 2024-02-10
Posts: 1,523
Website

Re: Send email to administrator when a stack trace error happens

This is not related to sending an email, but there should be an entry in systemd-coredump each time a stack trace is printed. This coredump can then be further examined for example with gdb (in combination with debuginfod) to obtain a useful backtrace.

Offline

#3 2025-01-13 10:33:11

ReDress
Member
From: Nairobi
Registered: 2024-11-30
Posts: 245

Re: Send email to administrator when a stack trace error happens

Xwang wrote:

Hi to all,
I'd like to know if it is possible to setup any service that send by email the stack trace (or the output of journalctl -b 0) when it appears in the dmesg (I'm referring to the messages included between [cut here] messages in dmesg).
Sometimes I get some random errors even though the system works correctly when they appear.

It might not be possible unless you embed some code into the kernel? Is there some sort of a way to tell that a stack trace has happened?

So, assuming that the answer to that question is yes, then, where do you start with combing the journalctl for output? Are there more than one stack traces in that journalctl account that you have to work around to get to the last/lastest one?

If these are not a problem then:

curl -X POST "data"

Why are we talking about email? :-)

Offline

Board footer

Powered by FluxBB