Tag: linux

  • How to configure LogRetention with journald

    Whenever you have a regular process, you definitely want to have some proper logging. But the very next thought after mentioning “logging” should be “LogRetention”. Especially when the process is executed automatically. No matter how often — as soon as the execution isn’t a one off, log rotation & log retention are a topic.

    LogRotate

    Especially on linux, it’s just so easy: use logrotate for example. Just one simple config file /settings and you’re set up with log rotation, compression and retention.

    journald & journalctl

    On my miniPC, I tried to avoid writing a lot of own log files but whent with journald and piped all logs into it. And never thought about retention. – Until today.

    I just set up another process and during testing, I noticed that I had more than 2.5gb of log files (journalctl --disk-usage) … dating back until very long. A quick check of the /etc/systemd/journald.conf confirmed that I missed some settings.

    journald has quite an elaborate set of options, just check the man page. Without big evaluation, I’ guess I’m fine with:

    Compress=yes
    SystemMaxUse=100M
    SystemMaxFileSize=5M
    MaxRetentionSec=1month

    Also, don’t forget to reload …

    sudo systemctl restart systemd-journald

    And don’t spend a second thinking about overflowing logs any more…

    Fediverse Reactions
  • How to Use a Lenovo ThinkCentre M910q as a Powerful Home Server

    As an IT enthusiast, I’ve long been (and still are!) a fan of the mini computers. My main Pi already runs multiple services like , and – which often pushes it near its limits. Well, recently I found myself wanting to add even more services to my local network. Unfortunately, my NAS can’t host Docker containers, so expanding compute power became necessary.

    (more…)
    Fediverse Reactions
  • Mount vmWare shared folder in Ubuntu guest

    If you want to share files between a Windows Host and a Ubuntu Linux guest, the “shared folder” feature is really handy. Just enable it in the VM-Settings, install guest additions and … then wonder where this shows up in the VM. “They appear under /mnt/hgfs” I read everywhere.

    Well, they do – as soon as you do a

    sudo mount.vmhgfs .host:/ /mnt/hgfs/
    

    It took me a couple of minutes to figure this out as all tutorials endet with “the folder appears” …
    If it doesn’t work, maybe just rerun

    sudo vmware-config-tools.pl