1

My laptop started randomly shutting down. For example, I'm skyping and then -boom- all of the sudden the screen goes black and it has shut down. Once I restart it, everything seems to work as normal. This has happened a few times now, but I can't spot any pattern. The laptop, at least externally, doesn't seem to overheat and it's a newer model, so I'm not sure what is going on.

Thus I would like to start a process that logs, say, every half a second, everything that there is to log regarding the laptop, meaning, temperature of the CPU, SSD, the memory consumption, all the running processes etc. You name it!
Are the any tools for this?
Thus, when it shuts down again, I hope to figure be able to figure out what happened by looking at the log and hopefully seeing a pattern immediately before the shut down. Thank you!

user719220
  • 13
  • 2

1 Answers1

2

Normally journal ist stored in /run/log/journal meaning it is not persistent.

but you can enable it. In /etc/systemd/journald.conf

storage=persistent

source

journalctl --list-boots 

show's you how many boots are stored. the previous boot has always number -1

journalctl -b -1

show's you the journal from previous boot.

For more output in /etc/systemd/system.conf set

LogLevel=info

Or even

LogLevel=debug

very much output

nobody
  • 5,149
  • 5
  • 22
  • 43
  • my `run/log` folder is empty, though... – user719220 Jan 17 '20 at 10:48
  • It is in`/run/log/journal/`. Do you see the difference? – nobody Jan 17 '20 at 10:52
  • Maybe I'm missing a point here, but even before I do anything to make it persistent, shouldn't there be something in `run/log`? There is no `journal` subfolder there (not even hidden), it's just empty ... – user719220 Jan 23 '20 at 09:45
  • `ps -p 1 -o comm=` andi `journalctl --list-boots` also `lsb_release -rd` and it is /run/log `ls -al /run/log/` – nobody Jan 23 '20 at 13:34