SystemD - nimrody/knowledgebase GitHub Wiki

  • Useful tools

    systemd-cgls /system.slice systemd-cgtop

  • rc.local service. See here

As root:

touch /etc/rc.local
chmod +x /etc/rc.local

You can now add whatever scripts or commands you like here – they will be run after everything else at your specific run-level has been started. In order for systemd to recognise and use this file, the systemd rc-local.service must be enabled.

systemctl enable rc-local.service

You can check the status of this service with:-

systemctl status rc-local.service
  • Vacuum old journal entries (taking space in /var/log/journal)

    journalctl --vacuum-time=2d journalctl --vacuum-size=500M # Retain only the past 500 MB