Closed shervinsahba closed 3 years ago
Ooooooh, this is interesting. It looks like journald
is going to be controlling what gets logged, which includes frequency of logging. You can adjust /etc/systemd/journald.conf manually to reduce the frequency allowed by any program, and probably edit mullvad's systemd service as well, but those aren't very user friendly. For now, maybe add something be added to the README giving people a heads up as to journals filling up.
Looking into it further, a quick fix would be editing your mullvad service (assuming it's being used) at /usr/lib/systemd/system/mullvad-daemon.service to execute the daemon with the --disable-log-to-file flag. If you want to check out the daemon itself it's located at /opt/Mullvad\ VPN/resources/mullvad-daemon.
EDIT: I can't test this to verify that it works but it should
Nice find! Yep it works!
Apparently the mullvad
repo from the Arch User Repo comes set with debug mode -v
on, so either disabling logs entirely or removing the debug flag seems good. Yeah, good suggestion - I'll make a note of that on the README.
# Systemd service unit file for the Mullvad VPN daemon
[Unit]
Description=Mullvad VPN daemon
Wants=network.target
After=network-online.target
After=NetworkManager.service
After=systemd-resolved.service
StartLimitBurst=5
StartLimitIntervalSec=20
[Service]
Restart=always
RestartSec=1
#ExecStart=/opt/Mullvad\x20VPN/resources/mullvad-daemon -v --disable-stdout-timestamps
#ExecStart=/opt/Mullvad\x20VPN/resources/mullvad-daemon --disable-stdout-timestamps --disable-log-to-file
ExecStart=/opt/Mullvad\x20VPN/resources/mullvad-daemon --disable-stdout-timestamps
[Install]
WantedBy=multi-user.target
Follow up with systemctl daemon-reload
and systemctl restart mullvad-daemon
.
Since the script calls
mullvad status
intermittently, journalctl ends up flooded with these requests. This leads to excessive journal size. The major issue I foresee is if the user has a small max journal size set: then mullvad (and perhaps other vpn) entries would dominate the space. This could make debugging computers with a small max journal size tricky. (Running on 5.4.1-MANJARO.)Does anyone know a good way to silence these journal outputs - preferably without silencing other mullvad journal outputs?