Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get dmesg before system hang?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Sat May 11, 2024 6:36 am    Post subject: How to get dmesg before system hang? Reply with quote

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
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1415
Location: Germany

PostPosted: Sat May 11, 2024 6:43 am    Post subject: Reply with quote

I'm not sure right now and I can think of other resources:

X11 logs: /var/log/ or in ~/.local/share/xorg/

https://wiki.gentoo.org/wiki/OpenRC#Logging

Or any other log file available in /var/log
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 612
Location: Fife, Scotland

PostPosted: Sat May 11, 2024 9:52 am    Post subject: Reply with quote

/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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54387
Location: 56N 3W

PostPosted: Sat May 11, 2024 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 992
Location: Somewhere in Denmark

PostPosted: Sat May 11, 2024 1:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21764

PostPosted: Sat May 11, 2024 2:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum