Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

How to get dmesg before system hang?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
guyuming
Apprentice
Apprentice
Posts: 269
Joined: Thu Nov 19, 2020 1:09 am

How to get dmesg before system hang?

  • Quote

Post by guyuming » Sat May 11, 2024 6:36 am

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.
Top
Banana
Administrator
Administrator
User avatar
Posts: 2386
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

  • Quote

Post by Banana » Sat May 11, 2024 6:43 am

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
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
wjb
l33t
l33t
User avatar
Posts: 681
Joined: Sun Jul 10, 2005 9:40 am
Location: Fife, Scotland

  • Quote

Post by wjb » Sat May 11, 2024 9:52 am

/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.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat May 11, 2024 10:29 am

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.
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Sat May 11, 2024 1:11 pm

On OpenRC you can, in /etc/conf.d/bootmisc

Code: Select all

/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.
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat May 11, 2024 2:50 pm

freke wrote:On OpenRC you can, in /etc/conf.d/bootmisc

Code: Select all

/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.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic