html tool

显示标签为“网卡”的博文。显示所有博文
显示标签为“网卡”的博文。显示所有博文

2020年12月7日星期一

转:linux 下查看网卡型号

 然后输入下面的命令lspci | grep -i ethernet

https://jingyan.baidu.com/article/fcb5aff75de13bedaa4a71cf.html

2020年10月26日星期一

转:nload

 转: https://linux.cn/article-2871-1.html

nload -u g  eth1  如下效果:


这里的-u参数是

  • 小写选项 -u: h 意为自动格式化为人类易读的单位,b 意为 Bit/s,k 意为 kBit/s,m 意为 MBit/s,g 意为 GBit/s。大写字母意为使用 Byte 替代 Bit。默认为 k。[popexizhi: 这里默认是bit/s ,-u B 改成byte/s ,这里的8好晕晕,想个方法吧 Byte=bit*8 ->B=8*bit -> B是8b娃娃啊,bit可不是]

基本语法是:

  1. nload
  2. nload device
  3. nload [options] device1 device2

转:iftop使用

 https://www.cnblogs.com/chenqionghe/p/10680075.html

默认指定网卡

iftop -i eth2 后如下:

=>代表发送数据,<= 代表接收数据 TX:发送流量([popexizhi:第一个看着是总计,\t后的是当前,这个默认单位是bits. 参考 : -B 以bytes为单位显示流量(默认是bits)]) RX:接收流量 TOTAL:总流量 Cumm:运行iftop到目前时间的总流量 peak:流量峰值 rates:分别表示过去 2s 10s 40s 的平均流量



2018年6月21日星期四

问题:rx调整的推测


参考:
https://matthias0tafelmeier.wordpress.com/2016/12/25/monitoring-and-tuning-the-linux-networking-stack-egress-tx/
https://blog.csdn.net/myweishanli/article/details/25506745


网卡调整如下:
ethtool -L em1 rx 1
ethtool -l

网卡应该是只适用第一个cpu接受数据了,但表现是suricata的丢包变少了,好奇怪啊;
之前rx 4反而有丢包,使用如下不是会更多丢包吗?感觉解释不通,难道是多cpu使用后合成分包数据的问题??
ethtool -L combined 32

转:ethtool 开启多队列网卡


https://toontong.github.io/blog/ethtool.html

ethool

一台使用使用Intel I350网卡的服务器, 死活只有一个网卡队列,因为之前升级过内核,与网卡驱动, 而另一台配置一样的机器默认就打开了8*2个队列, 钻牛角尖了.找了N久才找到方法开启. 二了, 就是这么容易:
ethtool -S eth0 #查看队列个数

ethtool -L eth0 combined  # 配置队列个数.

mpstat

查看各CPU中断叠加次数,每1秒收集一次,运行10次。
mpstat -I SUM -P ALL 1 10

2018年6月6日星期三

linux 网卡重启遇到的问题



问题环境:
cenos 7.3 ,真实机;
设置新的网卡配置后,重启网卡驱动,得到如下错误。重启操作系统可以使配置生效,记录一下问题。
go了相关问题
方法一:
加mac;--无效果

方法二:
 systemctl stop NetworkManager
 systemctl disable NetworkManager
 systemctl enable NetworkManager-wait-online.service    --无效果






log


Jun  6 19:11:30 localhost network: RTNETLINK answers: File exists
Jun  6 19:11:30 localhost network: RTNETLINK answers: File exists
Jun  6 19:11:30 localhost systemd: network.service: control process exited, code=exited status=1
Jun  6 19:11:30 localhost systemd: Failed to start LSB: Bring up/down networking.
Jun  6 19:11:30 localhost systemd: Unit network.service entered failed state.
Jun  6 19:11:30 localhost systemd: network.service failed.