zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    手机验证码登录注册--
    防止注册机,登录时-验证码图片的生成=前端vue+后端node
    VUE中数据排序sort() / 数据反转 reverse() 的使用
    将后台数据数组对象(对象里边包含数组对象)---改为前端想要的数组对象--改变key值(替换)
    vue--ui:antd pro框架--vue.config.js引入高德地图--描绘轨迹
    创建数据库-表-增加,设置主键
    mysql--各种安装包版本安装
    Vuex异步请求存取步骤
    从后往前查找去掉字符串最指定元素
    python安装第三方库
  • 原文地址:https://www.cnblogs.com/chuanzhang053/p/8950197.html
Copyright © 2011-2022 走看看