Séra Balázs@lemmy.world to linuxmemes@lemmy.world · 8 months agoRemember to not to forget clearing your journallemmy.worldimagemessage-square2linkfedilinkarrow-up11
arrow-up11imageRemember to not to forget clearing your journallemmy.worldSéra Balázs@lemmy.world to linuxmemes@lemmy.world · 8 months agomessage-square2linkfedilink
minus-squareMorethanevil@lemmy.fedifriends.sociallinkfedilinkarrow-up1·8 months agoCleanup Check current disk usage: sudo journalctl --disk-usage Use rotate function: sudo journalctl --rotate Or Remove all logs and keep the last 2 days: sudo journalctl --vacuum-time=2days Or Remove all logs and only keep the last 100MB: sudo journalctl --vacuum-size=100M How to read logs: Follow specific log for a service: sudo journalctl -fu SERVICE Show extended log info and print the last lines of a service: sudo journalctl -xeu SERVICE
minus-squaremacniel@feddit.orglinkfedilinkarrow-up1·8 months agoI mean yeah -fu stands for “follow unit” but its also a nice coincidence when it comes to debugging that particular service.
Cleanup
Check current disk usage:
sudo journalctl --disk-usage
Use rotate function:
sudo journalctl --rotate
Or
Remove all logs and keep the last 2 days:
sudo journalctl --vacuum-time=2days
Or
Remove all logs and only keep the last 100MB:
sudo journalctl --vacuum-size=100M
How to read logs:
Follow specific log for a service:
sudo journalctl -fu SERVICE
Show extended log info and print the last lines of a service:
sudo journalctl -xeu SERVICE
I mean yeah -fu stands for “follow unit” but its also a nice coincidence when it comes to debugging that particular service.