Logging
System logs
How to enable persistent logging
To make journald store logs persistently across boots:
- Shut down the RPi.
- Remove the RPi's SD card and insert it into your own computer instead.
- Mount the SD card's root partition on your computer.
- Make a new directory in the SD card's root partition at
/etc/systemd/journald.conf.d. - In the new directory at
/etc/systemd/journald.conf.d, make a new file named99-persistent-storage.conf, with the following contents:[Journal]
Storage=persistent - Reboot
warning
Storing logs persistently will wear out the SD card more quickly, so only do this if necessary!
To undo this change:
- Shut down the RPi.
- Remove the RPi's SD card and insert it into your own computer instead.
- Mount the SD card's root partition on your computer.
- Delete the file at
/etc/systemd/journald.conf.d/99-persistent-storage.conf. - Reboot
How to check logs from a previous boot
After enabling persistent logging:
- Enter the RPi's terminal.
- Run the command
journalctl --boot=-{n}to check the logs fromnboots ago. For example, runjournalctl --boot=-1to check the logs from the previous boot.
Firmware communication logs
How to enable the serial monitor tool
To install and enable our developer tool for viewing serial communication messages between the RPi and the microcontrollers:
- Connect the FRAME to the internet.
- Run
forklift pallet enable-depl --apply dev/serial-monitor.
To undo this change:
- Run
forklift pallet disable-depl --apply --cache-img=false dev/serial-monitor
How to monitor serial communication messages
After enabling the serial monitor tool:
- Open the FRAME's landing page.
- Add
/dev/serial-monitorto the landing page's URL in your web browser's address bar, and open the resulting URL. For example, if you access the landing page at http://openuc2.local, then you should open http://openuc2.local/dev/serial-monitor - ??? (TODO: add instructions for how to use the serial monitor tool!)