mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(systemd): extend commands for cleaning up
This commit is contained in:
@@ -16,3 +16,18 @@ sudo hostnamectl set-hostname --pretty 'prometheus'
|
||||
sudo systemctl list-units --state='failed'
|
||||
|
||||
sudo systemctl hybrid-sleep && exit
|
||||
|
||||
# Check how much space is taken up by logs
|
||||
sudo journalctl --disk-usage
|
||||
sudo du -sh '/var/log/journal'
|
||||
|
||||
# Rotate journal files.
|
||||
# Marks the journal logs currently active as archive, and creates fresh new logs.
|
||||
sudo journalctl --rotate
|
||||
|
||||
# Delete journal entries older than some time
|
||||
sudo journalctl --vacuum-time='2d'
|
||||
|
||||
# Restrict logs up to some size.
|
||||
# Deletes log files until the disk space they take falls below the specified size.
|
||||
sudo journalctl --vacuum-size='100M'
|
||||
|
||||
Reference in New Issue
Block a user