<a rel="me" href="https://layer8.space/@helix">Mastodon</a>

  • 6 Posts
  • 860 Comments
Joined 2 years ago
cake
Cake day: July 27th, 2024

help-circle





  • Bonus question about log files, how can I make them more useful in terms of information? Right now they just name the command, not even a timestamp or anything.

    Use a wrapper script which echo’s some useful output like “stopping container xy … stopped” and put the output of that in the log. Systemd units do it by default but you can also pipe it to rsyslogd or a similar logging service, or use specialised logging tools and monitoring like victorialogs.


  • If you can, just ditch crontabs and use systemd timers. Systemd tiners are available for ages on most distributions and are a way slicker version of cronjobs, with built in logging etc. – you need to create a systemd service in addition though.

    If you use a non-systemd OS you can still use something else than cronjobs. Most service managers have a timer option which is more modern.