Raspbian Pi – Installing Log 2 Ram Tool

printf “deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ bullseye main” | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
sudo apt update
sudo apt install log2ram
sudo perl -pe ‘s/^MAIL=.$/MAIL=false/g’ -i /etc/log2ram.conf
sudo perl -pe ‘s/^SIZE=.$/SIZE=100M/g’ -i /etc/log2ram.conf
sudo journalctl –vacuum-size=16M
sudo du -hs /var/log/* | sort -h | tail -n 5
sudo find /var/log/ -type f -name ‘*.gz’ -exec rm -rf {} +
sudo truncate -s 100 /var/log/*.log
sudo truncate -s 100 /var/log/*.log.[1-9]*
sudo du -hs /var/log/* | sort -h | tail -n 3
systemctl status log2ram
sudo reboot
systemctl status log2ram
sudo reboot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s