SAIL-IMX 6 NICが100メガかギガビットかを確認する方法


実際には、ethtoolコマンドを使用すれば、NICメガ数を表示する方法は簡単です.まずetholがLinuxの下でNICパラメータをクエリーおよび設定するコマンドであることを理解する必要があります.今からテストを始めましょう.
入力命令は次のとおりです.
root@imx6qdlsolo:~# ethtool eth0
Settings for eth0:
   Supported ports: [ TP MII ]

   Supported link modes:  10baseT/Half 10baseT/Full

                            100baseT/Half100baseT/Full

                            1000baseT/Full

   Supported pause frame use: Symmetric

   Supports auto-negotiation: Yes

   Advertised link modes: 10baseT/Half 10baseT/Full

                           100baseT/Half100baseT/Full

                            1000baseT/Full

   Advertised pause frame use: Symmetric

   Advertised auto-negotiation: Yes

   Link partner advertised link modes: 10baseT/Half 10baseT/Full

                                        100baseT/Half 100baseT/Full

                                        1000baseT/Full

   Link partner advertised pause frame use: Symmetric

   Link partner advertised auto-negotiation: Yes

   Speed: 1000Mb/s

   Duplex: Full

   Port: MII

   PHYAD: 1

   Transceiver: external

   Auto-negotiation: on

   Supports Wake-on: g

   Wake-on: d

   Link detected: yes

root@imx6qdlsolo:~#
詳細パラメータ参考:(//後は注釈、原文の訳文)
ethtool ethX/
ethool–h//ethoolのコマンドヘルプを表示(help)
ethool–i ethX//ethXネットワークポートの問い合わせ
ethool–d ethX//ethXポート登録情報の照会
ethool–r ethX//ethXポートをアダプティブモードにリセット
ethool–S ethX//ethXポート送受信パケット統計の照会
ethool–s ethX[speed 10|100|1000]//ネットワークポートレート10/100/1000 Mの設定
[duplex half|full]//網口半/全二重を設定
[autoneg on|off]//ネットワークポートの自己交渉を設定する
[port tp|aui|bnc|mii]//ネットワークポートタイプの設定
このようにこの命令により,必要な関連パラメータを得ることに成功したので,一緒に試してみよう.