Linux查看伺服器頻寬

  • 2019 年 10 月 5 日
  • 筆記

版權聲明:本文為部落客原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

本文鏈接:https://blog.csdn.net/xc_zhou/article/details/100670129

1.查看伺服器網路埠

ifconfig

查看頻寬大小:sudo ethtool xxx sudo ethtool eth0

[root@centos7-spider ~]# ethtool eth0  Settings for eth0:  	Supported ports: [ TP ]  	Supported link modes:   1000baseT/Full  	                        10000baseT/Full  	Supported pause frame use: No  	Supports auto-negotiation: No  	Advertised link modes:  Not reported  	Advertised pause frame use: No  	Advertised auto-negotiation: No  	Speed: 10000Mb/s  	Duplex: Full  	Port: Twisted Pair  	PHYAD: 0  	Transceiver: internal  	Auto-negotiation: off  	MDI-X: Unknown  	Supports Wake-on: uag  	Wake-on: d  	Link detected: yes

Speed: 10000Mb/s 頻寬為萬兆


nload

Device eth0 [10.16.169.14] (1/2):  ====================================================================  Incoming:                                            Curr: 27.99 kBit/s                                            Avg: 33.14 kBit/s                                            Min: 19.02 kBit/s                                            Max: 116.44 kBit/s                                            Ttl: 74.46 GByte  Outgoing:                                            Curr: 20.26 kBit/s                                            Avg: 83.46 kBit/s                                            Min: 17.72 kBit/s                                            Max: 3.19 MBit/s                                            Ttl: 145.30 GByte

Incoming也就是進入網卡的流量,Outgoing,也就是從這塊網卡出去的流量,每一部分都有下面幾個。

Curr:當前流量 Avg:平均流量 Min:最小流量 Max:最大流量 Ttl:總流量

nload默認的是eth0網卡,如果你想監測eth1網卡的流量,可以使用下面的命令。

nload eth1

同時查看多個網卡的流量情況

nload -m    //結果如下:  Device eth0 [10.16.169.14] (1/2):  ========================================================================================  Incoming:                                   Outgoing:  Curr: 30.23 kBit/s                          Curr: 28.14 kBit/s  Avg: 32.80 kBit/s                           Avg: 69.48 kBit/s  Min: 23.65 kBit/s                           Min: 18.23 kBit/s  Max: 133.16 kBit/s                          Max: 3.17 MBit/s  Ttl: 74.46 GByte                            Ttl: 145.30 GByte    Device lo [127.0.0.1] (2/2):  ========================================================================================  Incoming:                                   Outgoing:  Curr: 0.00 Bit/s                            Curr: 0.00 Bit/s  Avg: 150.82 kBit/s                          Avg: 150.82 kBit/s  Min: 0.00 Bit/s                             Min: 0.00 Bit/s  Max: 7.51 MBit/s                            Max: 7.51 MBit/s  Ttl: 276.67 GByte                           Ttl: 276.67 GByte

參考:https://www.jianshu.com/writer#/notebooks/26192912/notes/53757717/preview https://blog.csdn.net/u011983531/article/details/80245423