piframe/docs/log2ram.md

32 lines
696 B
Markdown
Raw Normal View History

2020-08-11 02:21:52 +00:00
# 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
```