1

I'm using openconnect with some VPN's, and after a while I see that the journald and syslog are using a lot of resources. The vpn's still work perfectly, but the computer gets really slow. After tailing syslog and running "journalctl -xe", I see that openconnect is spamming the syslog and the journal with messages like:

Oct 02 17:51:33 hostname openconnect[6837]: Connect UDP socket : Bad address

About 1000 of them every second. I was able to filter the syslog with a line in /etc/rsyslog.conf, but I can't find a way to stop openconnect from logging to journal. Is there anyway that I can do this?

1 Answer 1

1

What command are you using to start openconnect?

If you're using this version then apparently it has a "-l,--syslog Use syslog for progress messages" option, I don't see a "don't use syslog" option, so I'm assuming you've got the -l flag (or maybe the -v,--verbose or "--dump-http-traffic" flags) so try removing them from the startup command or it's config file.

With Network Manager starting the openconnect plugin, I thought it might be using settings in NetworkManager.conf[.d] and finding your openconnect section should lead to easily changing it's options... I'm not using openconnect but do have a /etc/NetworkManager/VPN/nm-openconnect-service.name file that doesn't seem to list options, so on to...

Logging options for Network Manager

Here's a little bit from man NetworkManager.conf

SYNOPSIS

   /etc/NetworkManager/NetworkManager.conf,
   /etc/NetworkManager/conf.d/name.conf,
   /run/NetworkManager/conf.d/name.conf,
   /usr/lib/NetworkManager/conf.d/name.conf,
   /var/lib/NetworkManager/NetworkManager-intern.conf

...

LOGGING SECTION
   This section controls NetworkManager's logging. Any settings here
   are overridden by the --log-level and --log-domains command-line
   options.

   level
       The default logging verbosity level. One of OFF, ERR, WARN,
       INFO, DEBUG, TRACE. The ERR level logs only critical errors.
       WARN logs warnings that may reflect operation. INFO logs
       various informational messages that are useful for tracking
       state and operations. DEBUG enables verbose logging for
       debugging purposes. TRACE enables even more verbose logging
       then DEBUG level. Subsequent levels also log all messages from
       earlier levels; thus setting the log level to INFO also logs
       error and warning messages.

   domains
       The following log domains are available: PLATFORM, RFKILL,
       ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6,
       AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS,
       SUSPEND, CORE, DEVICE, OLPC, WIMAX, INFINIBAND, FIREWALL,
       ADSL, BOND, VLAN, BRIDGE, DBUS_PROPS, TEAM, CONCHECK, DCB,
       DISPATCH, AUDIT, SYSTEMD, VPN_PLUGIN.

       In addition, these special domains can be used: NONE, ALL,
       DEFAULT, DHCP, IP.

       You can specify per-domain log level overrides by adding a
       colon and a log level to any domain. E.g.,
       "WIFI:DEBUG,WIFI_SCAN:OFF".

       Domain descriptions:
            VPN         : Virtual Private Network connections and
            VPN_PLUGIN  : logging messages from VPN plugins

So I think you might want something like one of these lines in the logging section:

VPN_PLUGIN:OFF
VPN:OFF

Or use the command line interface like this (check what the logging level are first with nmcli general logging) to keep the default domains at "level INFO" and change VPN logging to OFF:

nmcli general logging level INFO domains DEFAULT,VPN:OFF
4
  • I'm not starting it manually, I'm using a plugin for Network-Manager. Unfortunatelly, I do need the syslog logging. Thanks for the suggestions though.
    – user134167
    Oct 2, 2018 at 23:58
  • 1
    I read about network manager starting it automatically... it must be setting the flags, now just to figure out how to change network manager... I wonder if network manager isn't doing the logging itself, it's got some logging options too
    – Xen2050
    Oct 2, 2018 at 23:59
  • Hadn't thought of that, you're right. I'll look into the Network Manager startup options and if that doesn't work, into the code to see how to change the parameters. Thanks for the help! I'll update the question if I find the answer.
    – user134167
    Oct 3, 2018 at 0:03
  • I'm not too familiar with Network Manager, but it's nmcli tool can change logging (nmcli general logging to show, see man nmcli), or I think NetworkManager.conf looks like the right place to check
    – Xen2050
    Oct 3, 2018 at 0:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .