Linux系统如何查看服务器带宽及网络使用情况

前言

  操作系统 Linux
  操作环境 Centos7

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

众多网络相关的命令可查看【Linux】之【网络】相关的命令及解析[ethtool、nload、nethogs、iftop、iptraf、ifstat]

在这里插入图片描述

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

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

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

yum -y install python-pip

#等待下载完

pip install speedtest-cli

在这里插入图片描述

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

在这里插入图片描述

   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

在这里插入图片描述

#指定网卡进入
nload eno1

在这里插入图片描述

  Incoming是进入网卡的流量Outgoing是从这块网卡出去的流量每一部分都有下面几个。

Curr当前流量
Avg平均流量
Min最小流量
Max最大流量
Ttl总流量

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

dstat -n

在这里插入图片描述

总结

 相关文章

💻【Linux】之【CPU】相关的命令及解析[lscpu、mpstat]


💻【Linux】之【内存】相关的命令&&解析以及内存相关的问题[free、meminfo、内存泄漏、内存溢出、Overcommit]


💻【Linux】之【磁盘】相关的命令及解析[df、du、iostat、iotop]


💻【Linux】之【网络】相关的命令及解析[ethtool、nload、nethogs、iftop、iptraf、ifstat]


💻【Linux】综合性命令及解析【top、htop、vmstat、dstat、glances、sar】


💻【Linux】系统如何查看服务器带宽及网络使用情况


阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: linux服务器