New answers tagged logfiles
1
The systemd journal is only transient stored in a /run/log/journal/ which is located in RAM and lost on every reboot. You can make its storage persistent on the SD Card so you can also query old boots. In /usr/share/doc/systemd/README.Debian you will find:
To enable persistent logging, create /var/log/journal:
mkdir -p /var/log/journal
systemd-tmpfiles --...
0
Thanks above for info on dmesg and last commands. But what I found worked best was viewing var/log/messages and searching for the keyword "Booting":
less /var/log/messages | grep Booting and less /var/log/messages.1 | grep Booting.
For older archived messages, e.g., messages.2.gz, zcat /var/log/messages.2.gz | grep Booting worked nicely.
2
last shows a listing of last logged in users.
last -x should show what you want, although not directly.
last -x shows "the system shutdown entries and run level changes"
pi pts/0 10.1.2.100 Mon Jan 11 17:32 still logged in
pi pts/0 10.1.2.100 Sat Jan 9 18:06 - 13:08 (1+19:01)
pi pts/0 fe80::1ca4:...
Top 50 recent answers are included
Related Tags
logfiles × 51raspbian × 12
networking × 6
wifi × 5
boot × 5
power × 5
pi-3b+ × 4
pi-3 × 3
python × 3
cron × 3
terminal × 3
pi-2 × 2
sd-card × 2
raspbian-stretch × 2
power-supply × 2
raspbian-jessie × 2
headless × 2
script × 2
monitoring × 2
crash × 2
gpio × 1
ssh × 1
hardware × 1
linux × 1
serial × 1