diff --git a/docs/README.md b/docs/README.md index 555f4ac..a358cee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,14 +14,14 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war * [Finalize Setup (REQUIRED)](finalize_setup.md) * [Setup swap (REQUIRED)](swap.md) * [Additional Networking Setup (REQUIRED)](networking.md) +* [Apt use RAM (VERY SMART FOR 4Gb RAM)](apt_cache_tmpfs.md) * [Automatic Updates (VERY SMART)](auto_updates.md) +* [Logs in RAM (VERY SMART)](log2ram.md) +* [CPU Governor (VERY SMART)](cpu_governor.md) * [Slideshow Prep (REQUIRED)](slideshow_prep.md) * [Slideshow Setup (REQUIRED)](slideshow.md) * [Email Notifications (REQUIRED)](email_notifications.md) * [System Monitoring (REQUIRED)](monit.md) -* [CPU Governor (VERY SMART)](cpu_governor.md) -* [Logs in RAM (log2ram / VERY SMART)](log2ram.md) -* [Apt use RAM (VERY SMART FOR 4Gb RAM)](apt_cache_tmpfs.md) * [Pimoroni Fan Shim](pimoroni_fan_shim.md) * [HDMI Scheduled On/Off](scheduled_display.md) * [Backups via restic](restic.md) diff --git a/docs/log2ram.md b/docs/log2ram.md deleted file mode 100644 index afedbf7..0000000 --- a/docs/log2ram.md +++ /dev/null @@ -1,31 +0,0 @@ -# log2ram - -Move the logs to RAM with a single daily sync. This will help with keeping the micro sd card from being burned out from disk writes quickly. - -``` sh - -sudo -sHu root -git clone https://github.com/azlux/log2ram.git /opt/log2ram -cd /opt/log2ram -chmod +x install.sh -./install.sh - -nano -w /etc/log2ram.conf -MAIL=false -SIZE=64M -LOG_DISK_SIZE=200M - -# If you only want sync on shutdown/halt (you probably do...) -systemctl disable log2ram-daily.timer - -systemctl reboot - -sudo -sHu root -df -h /var/log - -# If log2ram isn't working or fails due to out of space problems -# rm -rf /var/log/journal/* -# systemctl restart log2ram -# systemctl restart systemd-journald - -``` diff --git a/docs/logging.md b/docs/logging.md new file mode 100644 index 0000000..69b6905 --- /dev/null +++ b/docs/logging.md @@ -0,0 +1,36 @@ +# Logging + +The below will re-work the way logs are handled on the system. Most of the logging will go into ram with syncs to disk only on reboot/shutdown. This will help keep the sd card from wearing out too fast. + +``` sh + +sudo -sHu root +git clone https://github.com/azlux/log2ram.git /opt/log2ram +cd /opt/log2ram +chmod +x install.sh +./install.sh + +nano -w /etc/log2ram.conf +MAIL=false +SIZE=128M +LOG_DISK_SIZE=512M + +# Only sync to disk on reboot/shutdown +systemctl disable log2ram-daily.timer + +# Tweak journald to work out of ram +sed -i 's/#Storage=auto/Storage=volatile/g' /etc/systemd/journald.conf +sed -i 's/#Compress=yes/Compress=yes/g' /etc/systemd/journald.conf +sed -i 's/#SystemMaxUse=/SystemMaxUse=128M/g' /etc/systemd/journald.conf + +systemctl reboot + +sudo -sHu root +df -h /var/log + +# If log2ram isn't working or fails due to out of space problems +# rm -rf /var/log/journal/* +# systemctl restart log2ram +# systemctl restart systemd-journald + +```