From e152c48f99f2984fd622cc81e6dda778a4da7bbd Mon Sep 17 00:00:00 2001 From: uhi22 Date: Tue, 28 Feb 2023 09:58:41 +0100 Subject: [PATCH] docu: log file evaluation on raspberry --- doc/installation_on_raspberry.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/doc/installation_on_raspberry.md b/doc/installation_on_raspberry.md index 5da143f..10df344 100644 --- a/doc/installation_on_raspberry.md +++ b/doc/installation_on_raspberry.md @@ -122,10 +122,24 @@ the service: sudo systemctl start pev.service ``` -To view the log of the service, run `journalctl --unit=pev` or `journalctl -f -u pev.service`. +To view the log of the service, run +- `journalctl --unit=pev` or +- `journalctl -f -u pev.service` +- `journalctl -u pev --since "5 min ago"` +To follow new messages: +- `journalctl -f` + +More possibilities are shown in https://wiki.archlinux.org/title/Systemd/Journal. + +The service log will grow very large, because it contains the complete communication during the charging session. To avoid filling the disk space with old logs, we may want to limit the size. One option is explained at https://got-tty.org/journalctl-via-journald-conf-die-loggroesse-definierenDo: +`nano /etc/systemd/journald.conf` and set the settings + +``` + SystemMaxUse=500M + SystemMaxFileSize=100M +``` +The first value defines the overall disk space which is used by the service logs. The second value specifies the maximum size of a single log file. -Todo: The service log will grow very large, because it contains the complete communication during the charging session. Do we need to take care to -keep the log slim? The next time we power-up the pi, even without a HDMI display and keyboard connected, the OLED should show the charge progress now. Using an RaspberryPi 3 without additional startup time optimization, the time from power-on until the start of SLAC is ~21 seconds.