From 757ed6b37674d6f6426b9069ae95dbb783e5508a Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 10 Aug 2020 22:21:52 -0400 Subject: [PATCH] Add log2ram docs --- docs/README.md | 3 ++- docs/log2ram.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 docs/log2ram.md diff --git a/docs/README.md b/docs/README.md index 98a7c85..bafc6af 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,9 +19,10 @@ Items marked ```REQUIRED``` are assumed to be setup and working. You've been war * [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) * [Pimoroni Fan Shim](pimoroni_fan_shim.md) * [HDMI Scheduled On/Off](scheduled_display.md) -* [CPU Governor](cpu_governor.md) * [Backups via restic](restic.md) * [Web Based Administration](cockpit.md) * [Web Dashboard / Landing Page](landing_page.md) diff --git a/docs/log2ram.md b/docs/log2ram.md new file mode 100644 index 0000000..afedbf7 --- /dev/null +++ b/docs/log2ram.md @@ -0,0 +1,31 @@ +# 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 + +```