Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journalctl receives excessive messages from vpn #6

Closed
shervinsahba opened this issue Aug 5, 2020 · 3 comments
Closed

journalctl receives excessive messages from vpn #6

shervinsahba opened this issue Aug 5, 2020 · 3 comments
Labels

Comments

@shervinsahba
Copy link
Owner

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?

2020-08-03T05:51:06-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:11-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:11-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:16-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:16-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:21-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:21-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:26-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:26-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:31-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:31-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:36-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:36-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:41-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
2020-08-03T05:51:41-0700 fractal mullvad-daemon[870]: [mullvad_daemon::management_interface][DEBUG] get_state
@jamc-code
Copy link
Contributor

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.

@jamc-code
Copy link
Contributor

jamc-code commented Aug 5, 2020

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

@shervinsahba
Copy link
Owner Author

shervinsahba commented Aug 6, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants