关于Linux性能监控之Network篇

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  大家都知道,影响网络的因素有很多这些因素包括,延迟、冲突、阻塞等等。 节下来让我们了解Linux性能监控之下Network的具体情况,并加上我们以前的几篇介绍,希望在关于Linux性能监控这方面对大家有更多的帮助。

  大部分的以太网络都是自适应速度的,因为一个网络中可能有不同的网络设备采用不同的速率和工作模式(全双工或半双工)。大部分企业网络都工作在100到1000BaseTX。ethtool命令可以设置网卡的工作速率和模式。

  # ethtool eth0

  Settings for eth0:

  Supported ports: [ TP MII ]

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

  100baseT/Half 100baseT/Full

  Supports auto-negotiation: Yes

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

  100baseT/Half 100baseT/Full

  Advertised auto-negotiation: Yes

  Speed: 10Mb/s

  Duplex: Half

  Port: MII

  PHYAD: 32

  Transceiver: internal

  Auto-negotiation: on

  Supports Wake-on: pumbg

  Wake-on: d

  Current message level: 0x00000007 (7)

  Link detected: yes

  Linux性能监控我们可以看到网卡工作在10Mb/s,模式为半双工,并且打开了自适应开关。我们通过下列命令强制设置网卡工作在100Mb/s全双工模式,并关闭自适应功能。

  # ethtool -s eth0 speed 100 duplex full autoneg off

  再次运行ethtool显示如下:

  # ethtool eth0

  Settings for eth0:

  Supported ports: [ TP MII ]

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

  100baseT/Half 100baseT/Full

  Supports auto-negotiation: Yes

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

  100baseT/Half 100baseT/Full

  Advertised auto-negotiation: No

  Speed: 100Mb/s

  Duplex: Full

  Port: MII

  PHYAD: 32

  Transceiver: internal

  Auto-negotiation: off

  Supports Wake-on: pumbg

  Wake-on: d

  Current message level: 0x00000007 (7)

  Link detected: yes

[1][2]

自己要先看得起自己,别人才会看得起你

关于Linux性能监控之Network篇

相关文章:

你感兴趣的文章:

标签云: