• linux环境中,查询网卡的速度(带宽)


    需求描述:

      今天一同事要整理测试环境的主机硬件配置信息,需要提供网卡的速度的信息,

      所以,就查询了下,在此记录下.

    操作过程:

    1.首先通过ip a命令查询主机的网口名称

    [root@redhat6 ~]# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether 08:00:27:56:bb:92 brd ff:ff:ff:ff:ff:ff
        inet 192.168.53.6/24 brd 192.168.53.255 scope global eth0
        inet6 fe80::a00:27ff:fe56:bb92/64 scope link 
           valid_lft forever preferred_lft forever
    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
        link/ether 08:00:27:6c:98:c9 brd ff:ff:ff:ff:ff:ff

    备注:要查询的网口是eth0,eth1.

    2.通过ethtool工具查询网卡设置信息

    [root@redhat6 ~]# 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: off (auto)
        Supports Wake-on: umbg
        Wake-on: d
        Current message level: 0x00000007 (7)
                       drv probe link
        Link detected: yes
    [root@redhat6 ~]# ethtool eth1
    Settings for eth1:
        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 (auto)
        Supports Wake-on: umbg
        Wake-on: d
        Current message level: 0x00000007 (7)
                       drv probe link
        Link detected: no

    备注:上面的查询信息中,Speed就是网卡的速度.

    文档创建时间:2018年4月26日10:54:37

  • 相关阅读:
    ASP.Net Core MVC+Ajax 跨域
    ASP.Net Core MVC 发生二次请求
    Spire高效稳定的.NET组件
    ASP.Net Core Razor+AdminLTE 小试牛刀
    二维码神器QRCoder
    读入 并查集 gcd/exgcd 高精度 快速幂
    Codeforces 348 D
    Gym
    BZOJ 3894 文理分科 最小割
    BZOJ 2132 圈地计划 最小割
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/8950197.html
Copyright © 2020-2023  润新知