Show Table of Contents
5.11. teamdctl を使用した teamd の制御
実行中の
teamd のインスタンスに統計値や設定情報をクエリーする、または変更を加えるには、制御ツール teamdctl を使用します。
チーム team0 の現在のステータスを表示するには、
root で以下のコマンドを実行します。
~]# teamdctl team0 state view
さらに詳細な出力を表示するには、以下のコマンドを実行します。
~]# teamdctl team0 state view -v
team0 の完全な状態のダンプを JSON 形式 (マシン処理に便利) で表示するには、以下のコマンドを実行します。
~]# teamdctl team0 state dump
team0 の設定ダンプを JSON 形式で表示するには、以下のコマンドを実行します。
~]# teamdctl team0 config dump
チーム team0 の一部であるポート em1 の設定を表示するには、以下のコマンドを実行します。
~]# teamdctl team0 port config dump em1
5.11.1. ネットワークチームへのポートの追加
ポート em1 をネットワークチーム team0 に追加するには、
root で以下のコマンドを実行します。
~]# teamdctl team0 port add em1
重要
teamdctl を直接使用してポートをスレーブとして設定する場合は、スレーブポートは down に設定する必要があります。そうでない場合には teamdctl team0 port add em1 コマンドは失敗してしまいます。
5.11.2. ネットワークチームからのポートの削除
ポート em1 をネットワークチーム team0 から削除するには、
root で以下のコマンドを実行します。
~]# teamdctl team0 port remove em1
5.11.3. ネットワークチーム内のポートへの設定適用
ネットワークチーム team0 内のポート em1 に JSON 形式の設定を適用するには、
root で以下の形式のコマンドを実行します。
~]# teamdctl team0 port config update em1 JSON-config-string
ここでの JSON-config-string は、JSON 形式での文字列による設定になります。これにより、提供された JSON 形式の文字列を使用しているポートの設定が更新されます。ポートを設定する有効な JSON 文字列の例は、以下のとおりです。
{
"prio": -10,
"sticky": true
}
JSON 設定文字列を単一引用符で囲み、改行は省略します。
古い設定は上書きされ、省略されたオプションはデフォルト値にリセットされることに注意してください。他のチームデーモンの制御ツールコマンド例については、
teamdctl(8) man ページを参照してください。
5.11.4. ネットワークチーム内のポート設定表示
ネットワークチーム team0 内のポート em1 の設定をコピーするには、
root で以下のコマンドを実行します。
~]# teamdctl team0 port config dump em1
これでポート設定が JSON 形式で標準出力にダンプされます。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.