gkrellm displays too many virtual network interfaces from Docker

2

I booted up a Docker container with docker-compose up and it has created 7 new network interfaces. These are all appearing in gkrellm.

Unfortunately each time Docker starts up, it creates new random names for the network interfaces. The preferences are now full of old interfaces!

How can I hide these interfaces from displaying in Gkrellm?

For bonus points, how can I remove old interfaces from the config?

joeytwiddle

Posted 2017-05-21T15:00:45.100

Reputation: 1 346

Answers

3

Note: More recently, a patch was added to ignore specific interfaces from being auto-detected:

This is probably a better solution but I won't go into it right now.

Since GKrellM version 2.3.6 there is an option net_enabled_as_default that will disable new network interfaces from being added automatically.

  1. Close GKRellM

  2. Open the config file with:

    vim ~/.gkrellm2/user-config
    
  3. Use / to search for the setting net net_enabled_as_default

  4. Change the value from 1 to 0

  5. Start GKRellM

After this GKRellM will no longer automatically add all new interfaces it sees.


If you want to clear out all the old entries that have accumulated:

  1. Close GKRellM

  2. Open the config file with:

    vim ~/.gkrellm2/user-config
    
  3. Run the following commands to remove unwanted veth entries:

    :g/^net enables veth/d
    :g/^net chart_config veth/d
    
  4. If you also have a lot of net enables dNNNNNNNN entries, you may want to rerun the above commands with d instead of veth.

  5. Save and quit. :wq<Enter>

  6. Start GKRellM again


But users of older versions of GKRellm, note that GKRellM will detect any active interfaces on your machine and display them again.

You can hide an interface, instead of removing it, by changing the setting 1 1 0 to 0 1 0:

:%s/^\(net enables veth.*\) 1 1 0/\1 0 1 0

joeytwiddle

Posted 2017-05-21T15:00:45.100

Reputation: 1 346