商城首页欢迎来到中国正版软件门户

您的位置: 首页 > 文章列表 > 系统应用 > CentOS的网络带宽出口大小的查看方法

CentOS的网络带宽出口大小的查看方法

  发布于2026-06-06 阅读(0)

扫一扫,手机访问

做运维的老铁们,肯定经常遇到一个需求:检查系统的时候,总要看看服务器的网络端口带宽到底是多少。毕竟带宽大小直接影响服务性能,这活儿没得躲。

那怎么在 CentOS 下快速查看网络出口带宽呢?其实一条命令就搞定——ethtool

用法很简单:ethtool eth0,前面是命令,后面跟着网络设备名。如果你的外网设备叫 eth1,那就改成 ethtool eth1。拿 eth0 举个例子,执行效果是这样的:

# ethtool eth0
Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                           100baseT/Half 100baseT/Full
                           1000baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                           100baseT/Half 100baseT/Full
                           1000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: Unknown
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
                           drv probe link
    Link detected: yes

输出内容挺详细的,但咱们最关心的其实就两行:SpeedLink detected。这里 Speed 显示 1000Mb/s,也就是千兆;Link detected 是 yes,说明物理链路是通的。其他像 Duplex(全双工)、Auto-negotiation(自动协商)这些,一般保持默认就行,除非遇到兼容性问题才需要手动调整。

说白了,ethtool 就是网络排查的“万能钥匙”,查带宽、查协商状态、查网卡支持的模式,都靠它。下次遇到类似需求,别再挠头了,直接撸一把 ethtool 就完事。

本文转载于:https://www.jb51.net/os/RedHat/528475.html 如有侵犯,请联系zhengruancom@outlook.com删除。
免责声明:正软商城发布此文仅为传递信息,不代表正软商城认同其观点或证实其描述。

热门关注