5.11. Controlling teamd with teamdctl

In order to query a running instance of teamd for statistics or configuration information, or to make changes, the control tool teamdctl is used.
To view the current team state of a team team0, enter the following command as root:
~]# teamdctl team0 state view
For a more verbose output:
~]# teamdctl team0 state view -v
For a complete state dump in JSON format (useful for machine processing) of team0, use the following command:
~]# teamdctl team0 state dump
For a configuration dump in JSON format of team0, use the following command:
~]# teamdctl team0 config dump
To view the configuration of a port em1, that is part of a team team0, enter the following command:
~]# teamdctl team0 port config dump em1

5.11.1. Add a Port to a Network Team

To add a port em1 to a network team team0, issue the following command as root:
~]# teamdctl team0 port add em1

Important

If using teamdctl directly to enslave a port, the slave port must be set to down. Otherwise the teamdctl team0 port add em1 command will fail.

5.11.2. Remove a Port From a Network Team

To remove an interface em1 from a network team team0, issue the following command as root:
~]# teamdctl team0 port remove em1

5.11.3. Apply a Configuration to a Port in a Network Team

To apply a JSON format configuration to a port em1 in a network team team0, issue a command as root in the following format:
~]# teamdctl team0 port config update em1 JSON-config-string
Where JSON-config-string is the configuration as a string of text in JSON format. This will update the configuration of the port using the JSON format string supplied. An example of a valid JSON string for configuring a port would be the following:
{
  "prio": -10,
  "sticky": true
}
Use single quotes around the JSON configuration string and omit the line breaks.
Note that the old configuration will be overwritten and that any options omitted will be reset to the default values. See the teamdctl(8) man page for more team daemon control tool command examples.

5.11.4. View the Configuration of a Port in a Network Team

To copy the configuration of a port em1 in a network team team0, issue the following command as root:
~]# teamdctl team0 port config dump em1
This will dump the JSON format configuration of the port to standard output.