View previous topic :: View next topic |
Author |
Message |
RayDude Advocate


Joined: 29 May 2004 Posts: 2096 Location: San Jose, CA
|
Posted: Sun Feb 16, 2025 9:22 pm Post subject: How to parse a 22GB messages file to find panic / reboot |
|
|
My server crashed last night.
I was attempting to make a backup with borg backup and I thought the external drive may have run out of space... But that's not the case.
I'm attempting to diagnose the issue. I need to parse a 22 GB messages file. I grepped -i for the keyword panic, but found nothing.
How can I figure out where the relevant messages are in the log. Vim is efficient enough to load it, but searches are slow.
Is there an easier way to diagnose the problem?
Thanks.
Update: I have a bigger problem. My messages kernel log is so big because it's spammed with, "kwin_core: parsing edid failed"
I know why, because I'm using an external DisplayPort to HDMI adapter to get 4K 120 Hz to run. I need that warning to go away.
Update: As for this, I changed my log level to 1. And it doesn't suppress the messages.
Update: I continued the backup today and after an hour or so of compressing (that's what it spends most of its time doing) the computer reboot while I was watching SNL 50th.
It may be a USB issue. Since I turned the log down to 1 though it looks like there's nothing in /var/log/messages... _________________ Some day there will only be free software.
Last edited by RayDude on Mon Feb 17, 2025 2:53 am; edited 1 time in total |
|
Back to top |
|
 |
spica Guru

Joined: 04 Jun 2021 Posts: 345
|
Posted: Mon Feb 17, 2025 2:06 am Post subject: Re: How to parse a 22GB messages file to find panic / reboot |
|
|
RayDude wrote: | How can I figure out where the relevant messages are in the log |
Has the system been rebooted? If so, try to find the lines that appear first during the server boot process. The lines above them indicate the final moments of the previous boot.
You can use `grep -v` to filter out known lines, for example: grep -v 'kwin_core: parsing edid failed'. Store the filtered output in a temporary file to avoid re-grepping the 22GB log file again and again. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23124
|
Posted: Mon Feb 17, 2025 3:41 am Post subject: |
|
|
A panic will not be written to the log, because the panic stops all processing, so the syslog daemon is never given the chance to write the panic text to the log. You might find some pre-panic messages of interest, though. |
|
Back to top |
|
 |
gentoo_ram Guru

Joined: 25 Oct 2007 Posts: 520 Location: San Diego, California USA
|
Posted: Mon Feb 17, 2025 4:28 am Post subject: Re: How to parse a 22GB messages file to find panic / reboot |
|
|
RayDude wrote: |
Update: I have a bigger problem. My messages kernel log is so big because it's spammed with, "kwin_core: parsing edid failed"
I know why, because I'm using an external DisplayPort to HDMI adapter to get 4K 120 Hz to run. I need that warning to go away.
|
You can definitely filter annoying messages such as these in syslog-ng for sure. I filter out all kinds of verbose messages from /var/log/message. Which syslog program are you running? |
|
Back to top |
|
 |
RayDude Advocate


Joined: 29 May 2004 Posts: 2096 Location: San Jose, CA
|
Posted: Mon Feb 17, 2025 6:41 am Post subject: |
|
|
Thanks everyone.
I'm running syslog-ng, I'll figure out how to filter k_win and ACPI unhandled event.
Since the issue is reproducable, I should be able to look at the console when I make it crash the next time.
Since I didn't have this problem before, it's either a hardware failure, which seems unlikely or an issue with the latest kernel.
Right now I don't have the time to pursue it, so I'll put it off until I have some time.
If I can't trap the issue (there's no visible panic screen, the system just rebooted), I'll hook up a serial port and another computer to try to capture the console via the serial port.
Well, that's what I want to do, but it's time consuming and I have a lot on my plate these days so we'll see.
I might just move back to a stable kernel and see if borg works with it.
I'm running kernel: 6.13.2-gentoo.
I have an older AMD Zen 3 CPU and I wonder if that's having new kernel issues. I've run into that with an older intel core processor where later kernels were unstable on the older processor. Or at least seemed to be.... You can never really know unless you can catch it in the act...
Again, thanks. _________________ Some day there will only be free software. |
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2207
|
Posted: Mon Feb 17, 2025 9:20 am Post subject: |
|
|
If you have the persistent storage options set in your kernel config, you might find some useful info there. (That said, I've never seen anything useful myself.) _________________ Greybeard |
|
Back to top |
|
 |
Ralphred l33t

Joined: 31 Dec 2013 Posts: 729
|
Posted: Mon Feb 17, 2025 5:11 pm Post subject: |
|
|
RayDude wrote: | I'm running kernel: 6.13.2-gentoo.
I have an older AMD Zen 3 CPU | What do you consider older? I have a 5600x I'm willing to upgrade to 6.13.<current> as a yardstick if you like? It's on 6.12.8 ATM and doesn't do anything special (like routing or ceph etc.) except LIRC. RayDude wrote: | spammed with, "kwin_core: parsing edid failed" | You can pass drm.edid_firmware=<card output name according to kernel>:edid/<my custom edid file stored in /lib/firmware/edid/> on the kernel command line, there are a few EDID tools in portage to help generate /lib/firmware/edid/<my monitor> files - that seems the "proper" solution to your huge logfiles, well, a "monitor firmware upgrade" notwithstanding. |
|
Back to top |
|
 |
wjb l33t


Joined: 10 Jul 2005 Posts: 646 Location: Fife, Scotland
|
|
Back to top |
|
 |
gentoo_ram Guru

Joined: 25 Oct 2007 Posts: 520 Location: San Diego, California USA
|
Posted: Tue Feb 18, 2025 7:05 pm Post subject: |
|
|
Here's an example of message filtering with syslog-ng. My actual configuration lists a lot more exclusions.
Code: | source src { system(); unix-stream("/dev/log" max-connections(256)); internal(); file("/proc/kmsg"); udp6(keep_timestamp(no)); tcp6(keep_timestamp(no)); };
filter mainf { not program("dovecot") and not program("postfix") and not host("hp479fdw") and not host("hp479fdw-wl") and not message("peripheral low-power state") and not message("make_env: No") ;};
destination messages { file("/var/log/messages"); };
log { source(src); filter(mainf); destination(messages); };
|
|
|
Back to top |
|
 |
|