View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Sat May 11, 2024 6:36 am Post subject: How to get dmesg before system hang? |
|
|
my system hangs now and then, ctrl + alt + f(1-7) to switch tty also unresponsive.
if i press the power button, i can see messages on screen says system shutting down step by step, like everything is OK.
I am trying to check dmesg, but how can i find the dmesg of the session before hang?
I found only /var/log/dmesg, no /var/log/dmesg.0 or /var/log/dmesg.1.
And i am using OpenRC with seatd, no systemd or elogind. |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1658 Location: Germany
|
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 624 Location: Fife, Scotland
|
Posted: Sat May 11, 2024 9:52 am Post subject: |
|
|
/var/log/everything/current includes the date-stamped dmesg messages from sessions - logrotate moves to these other files under /var/log/everything at intervals and deletes them eventually. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54550 Location: 56N 3W
|
Posted: Sat May 11, 2024 10:29 am Post subject: |
|
|
guyuming,
That sounds like an Xorg issue or something graphics related as the system still does the 'right thing' in response to the power button.
Can you ssh in and get dmesg that way? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1024 Location: Somewhere in Denmark
|
Posted: Sat May 11, 2024 1:11 pm Post subject: |
|
|
On OpenRC you can, in /etc/conf.d/bootmisc Code: | /etc/conf.d/bootmisc:# Save the previous dmesg log to dmesg.old
/etc/conf.d/bootmisc:previous_dmesg=yes | To keep the previous dmesg after reboot. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22447
|
Posted: Sat May 11, 2024 2:50 pm Post subject: |
|
|
freke wrote: | On OpenRC you can, in /etc/conf.d/bootmisc Code: | /etc/conf.d/bootmisc:# Save the previous dmesg log to dmesg.old
/etc/conf.d/bootmisc:previous_dmesg=yes | To keep the previous dmesg after reboot. | /var/log/dmesg is only written at boot though, and OP's problem seems to occur some time well after boot. Therefore, preserving the dmesg from the previous boot will not save anything relevant to OP's problem. |
|
Back to top |
|
|
|