Linux系统查看服务器带宽及网络使用情况的具体方法

2023-12-02 0 665
目录
  • 前言
  • linux查看服务器带宽具体方法   
    • 一、使用speedtest-cli命令查看下载和上传最大流量值
    • 二、查看网卡、网络的详情    
      • 1.查看服务器网络端口
      • 2.ethtool命令查看宽带大小
    • 三、nload命令实时统计网卡带宽使用率
      • 四、dstat -n命令实时监测网络的状态

      前言

        操作系统: Linux  操作环境: Centos7

      Linux系统中如何查看服务器带宽?本篇文章主要和大家分享一下Linux系统中查看服务器带宽的方法,有需要的朋友可以参考一下。

      众多网络相关的命令可查看:解读Linux下ip命令展示的网络连接信息

      linux查看服务器带宽具体方法   

      一、使用speedtest-cli命令查看下载和上传最大流量值

      因为命令是python的,所以,需要先下载一个python,用pip下载次命令;

      yum -y install python-pip
      #等待下载完
      pip install speedtest-cli

      Linux系统查看服务器带宽及网络使用情况的具体方法

      root@cs:[/root]speedtest-cli
      Retrieving speedtest.net configuration…
      Testing from China Unicom (125.119.20.3)…
      Retrieving speedtest.net server list…
      Selecting best server based on ping…
      Hosted by China Telecom TianJin-5G (TianJin) [123.83 km]: 47.213 ms
      Testing download speed……………………………………………………………………..
      Download: 16.36 Mbit/s
      Testing upload speed……………………………………………………………………………………
      Upload: 18.58 Mbit/s

      二、查看网卡、网络的详情    

      1.查看服务器网络端口

      ifconfig

      Linux系统查看服务器带宽及网络使用情况的具体方法

      2.ethtool命令查看宽带大小

      ethtool 网卡名称
      [root@222 ~]# ethtool eno1
      Settings for eno1:
      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
      Supported FEC modes: Not reported
      Advertised link modes: 10baseT/Half 10baseT/Full
      100baseT/Half 100baseT/Full
      1000baseT/Full
      Advertised pause frame use: No
      Advertised auto-negotiation: Yes
      Advertised FEC modes: Not reported
      Speed: 100Mb/s
      Duplex: Full
      Port: Twisted Pair
      PHYAD: 1
      Transceiver: internal
      Auto-negotiation: on
      MDI-X: off (auto)
      Supports Wake-on: pumbg
      Wake-on: g
      Current message level: 0x00000007 (7)
      drv probe link
      Link detected: yes

      Speed: 100Mb/s 带宽为白兆

      三、nload命令实时统计网卡带宽使用率

      没有nload命令的需要下载;

      yum -y install nload
      #等待下载完
      #直接使用命令查看
      nload

      Linux系统查看服务器带宽及网络使用情况的具体方法

      #指定网卡进入nload eno1

      Linux系统查看服务器带宽及网络使用情况的具体方法

      Incoming是进入网卡的流量,Outgoing是从这块网卡出去的流量,每一部分都有下面几个。Curr:当前流量Avg:平均流量Min:最小流量Max:最大流量Ttl:总流量

      四、dstat -n命令实时监测网络的状态

      dstat -n

      Linux系统查看服务器带宽及网络使用情况的具体方法

      到此这篇关于Linux系统如何查看服务器带宽及网络使用情况的文章就介绍到这了,更多相关linux查看服务器带宽及网络使用内容请搜索悠久资源以前的文章或继续浏览下面的相关文章希望大家以后多多支持悠久资源!

      收藏 (0) 打赏

      感谢您的支持,我会继续努力的!

      打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
      点赞 (0)

      悠久资源 服务器其它 Linux系统查看服务器带宽及网络使用情况的具体方法 https://www.u-9.cn/server/qita-server/34359.html

      常见问题

      相关文章

      发表评论
      暂无评论
      官方客服团队

      为您解决烦忧 - 24小时在线 专业服务