User Tools

Site Tools


packet:bpq_logging_reduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
packet:bpq_logging_reduction [2025/04/13 06:42] – [Writing all linbpq packets to syslog] m0mzfpacket:bpq_logging_reduction [2025/04/14 20:05] (current) – [Newer versions of Raspberry Pi OS (i.e. Debian 12)] m0mzf
Line 73: Line 73:
 <code>sudo rm -rf /var/log/journal</code> <code>sudo rm -rf /var/log/journal</code>
  
-There will still be some stuff ending up in /var/log - on a Debian system this will be logs from apt, dpkg etc, but all syslogging will now be in RAM and sizes kept under control. As the syslog is in RAM rebooting the Pi / if the Pi crashes all the logs will be lost. If you want persistent log storage (for example on a Pi 5 with an NVMe SSD) then you can get some control by vacuuming / configuring journald - that's beyond the scope of "save your SD card" so there's some good reading [[https://linuxhandbook.com/clear-systemd-journal-logs/|here]]+There will still be some stuff ending up in /var/log - on a Debian system this will be logs from apt, dpkg etc, and other packages (ginx, mosquitto etc) by default are configured to write directly to it, but all syslogging will now be in RAM and sizes kept under control. As the syslog is in RAM rebooting the Pi / if the Pi crashes all the logs will be lost. If you want persistent log storage (for example on a Pi 5 with an NVMe SSD) then you can get some control by vacuuming / configuring journald - that's beyond the scope of "save your SD card" so there's some good reading [[https://linuxhandbook.com/clear-systemd-journal-logs/|here]]
  
 To see what linbpq has been saying run To see what linbpq has been saying run
Line 92: Line 92:
 mkdir ~/src; cd ~/src mkdir ~/src; cd ~/src
 git clone https://github.com/RaymiiOrg/remys_fast_mqtt_logger git clone https://github.com/RaymiiOrg/remys_fast_mqtt_logger
-cd remys_fast_mqtt_logger; mkdir build;cd build+cd remys_fast_mqtt_logger; mkdir build; cd build
 cmake -DCMAKE_BUILD_TYPE=Release  .. cmake -DCMAKE_BUILD_TYPE=Release  ..
 </code> </code>
Line 141: Line 141:
 <code>journalctl -u packet-syslog.service -n 1 -f</code> <code>journalctl -u packet-syslog.service -n 1 -f</code>
  
-Expect this to use up maybe a dozen MB/day, depending on how busy your node is.+Expect this to use up maybe a few MB/day, depending on how busy your node is.
packet/bpq_logging_reduction.1744526555.txt.gz · Last modified: 2025/04/13 06:42 by m0mzf