首页 > 其他分享 >0232-IP 命令数据统计

0232-IP 命令数据统计

时间:2024-08-15 11:16:10浏览次数:7  
标签:errors tx 0232 packets Number rx 命令 IP 数据包

环境

  • Time 2022-11-25
  • WSL-Ubuntu 22.04

前言

说明

参考:https://docs.kernel.org/networking/statistics.html

目标

前一节讲了 ethtool 命令获取网卡和统计信息,ip 命令也可以获取一些数据包的信息。

显示信息

ip -s -s link show dev dev_name 命令可以显示网卡的统计信息:

root@jiangbo12490:~# ip -s -s link show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:15:5d:0f:ca:04 brd ff:ff:ff:ff:ff:ff
    RX:  bytes packets errors dropped  missed   mcast
     335787159  227541      0       0       0    1693
    RX errors:  length    crc   frame    fifo overrun
                     0      0       0       0       0
    TX:  bytes packets errors dropped carrier collsns
       7630852  110020      0       0       0       0
    TX errors: aborted   fifo  window heartbt transns
                     0      0       0       0       1

一般来说,RX 表示接收,TX 表示发送。

RX

rx_bytes

Number of good received bytes, corresponding to rx_packets.

收到的字节数,和 rx_packets 对应。

rx_packets

Number of good packets received by the interface. For hardware interfaces counts all good packets received from the device by the host, including packets which host had to drop at various stages of processing (even in the driver).

网卡接口接收到的正常数据包数量。硬件接口统计主机从设备接收的所有正常数据包,包括主机在不同处理阶段(甚至在驱动程序中)必须丢弃的数据包。

rx_errors

Total number of bad packets received on this network device. This counter must include events counted by rx_length_errors, rx_crc_errors, rx_frame_errors and other errors not otherwise counted.

此网络设备上接收的坏数据包总数。这个记录数必须包括由 length_errors、crc_errors、frame_errors 和其他未知错误数。

rx_dropped

Number of packets received but not processed, e.g. due to lack of resources or unsupported protocol. For hardware interfaces this counter may include packets discarded due to L2 address filtering but should not include packets dropped by the device due to buffer exhaustion which are counted separately in rx_missed_errors.

接收但未处理的数据包数量,例如,由于资源不足或协议不受支持。对于硬件接口,此计数可能包括由于二层地址过滤而丢弃的数据包,但不应包括由于缓冲区耗尽而由设备丢弃的数据,这些数据包在 rx_missed 中单独计数。

rx_missed

Count of packets missed by the host. Counts number of packets dropped by the device due to lack of buffer space. This usually indicates that the host interface is slower than the network interface, or host is not keeping up with the receive packet rate. This statistic corresponds to hardware events and is not used on software devices.

主机丢失的数据包计数。统计设备由于缓冲区空间不足而丢弃的数据包数。这通常表示主机接口比网络接口慢,或者主机跟不上接收包速率。此统计信息对应于硬件事件,不用于软件设备。

rx_mcast

Multicast packets received. For hardware interfaces this statistic is commonly calculated at the device level (unlike rx_packets) and therefore may include packets which did not reach the host.

接收到的多播数据包。对于硬件接口,此统计通常在设备级计算(与 rx_packets 不同),因此可能包括未到达主机的数据包。

rx_length_errors

Number of packets dropped due to invalid length.

由于长度无效而丢弃的数据包数。

rx_crc_errors

Number of packets received with a CRC error.

接收到 CRC 错误的数据包数。

rx_frame_errors

Receiver frame alignment errors.

接收到帧对齐错误的数据包。

rx_fifo_errors

Receiver FIFO error counter. Historically the count of overflow events. Those events may be reported in the receive descriptors or via interrupts, and may not correspond one-to-one with dropped packets.

This statistics was used interchangeably with rx_over_errors. Not recommended for use in drivers for high speed interfaces. This statistic is used on software devices, e.g. to count software packet queue overflow (can) or sequencing errors (GRE).

接收到 FIFO 错误的数据包。之前用来做溢出事件的计数。这些事件可以在接收描述符中或通过中断来报告,并且可能与丢弃的数据包不是一一对应。

此统计数据与 rx_over_errors 之前互换使用。不建议在高速接口的驱动程序中使用。该统计数据用于软件设备,例如用于软件层数据包队列溢出或序列号错误。

rx_over_errors

Receiver FIFO overflow event counter. Historically the count of overflow events. Such events may be reported in the receive descriptors or via interrupts, and may not correspond one-to-one with dropped packets.

The recommended interpretation for high speed interfaces is - number of packets dropped because they did not fit into buffers provided by the host, e.g. packets larger than MTU or next buffer in the ring was not available for a scatter transfer.

This statistics was historically used interchangeably with rx_fifo_errors. This statistic corresponds to hardware events and is not commonly used on software devices.

接收到 FIFO 错误的数据包。之前用来做溢出事件的计数。这些事件可以在接收描述符中或通过中断来报告,并且可能与丢弃的数据包不是一一对应。

高速接口的建议解释是:由于数据包不适配主机提供的缓冲区而丢弃的数据包数量,例如,大于 MTU 的数据包或环中的下一个缓冲区不可用于旁路传输。

此统计数据与 rx_fifo_errors 之前互换使用。不建议在高速接口的驱动程序中使用。该统计数据对应于硬件事件,不常用于软件设备。

TX

tx_bytes

传送的字节数,和 tx_packets 对应。

tx_packets

Number of packets successfully transmitted. For hardware interfaces counts packets which host was able to successfully hand over to the device, which does not necessarily mean that packets had been successfully transmitted out of the device, only that device acknowledged it copied them out of host memory.

成功传输的数据包数。对于硬件接口,统计主机能够成功交给设备的数据包,这并不一定意味着数据包已成功从设备中传输出去,只有确切该设备已将数据包从主机内存中复制出去。

tx_errors

Total number of transmit problems. This counter must include events counter by tx_aborted_errors, tx_carrier_errors, tx_fifo_errors, tx_heartbeat_errors, tx_window_errors and other errors not otherwise counted.

传输出错的数据包总数。此计数必须包括事件计数器,包括 tx_aborted_errors、tx_carrier_errors、tx_fifo_errors、tx_heartbeat_errors 和 tx_window_errors 以及其他未知的错误。

tx_dropped

Number of packets dropped on their way to transmission, e.g. due to lack of resources.

在传输中丢弃的数据包数量,例如由于资源不足。

tx_carrier

Number of frame transmission errors due to loss of carrier during transmission.

传输过程中由于载波丢失而导致的帧传输错误数。

tx_collsns

Number of collisions during packet transmissions.

传输期间冲突的数据包数量。

tx_aborted_errors

High speed interfaces may use this counter as a general device discard counter.

高速接口可将此计数用作通用设备丢弃计数。

tx_fifo_errors

Number of frame transmission errors due to device FIFO underrun/underflow. This condition occurs when the device begins transmission of a frame but is unable to deliver the entire frame to the transmitter in time for transmission. Part of aggregate “carrier” errors in /proc/net/dev.

由于设备 FIFO 不足或下溢导致的帧传输错误数。当设备开始传输帧但不能及时将整个帧传送给传输者进行传输时,就会出现这种情况。

tx_window_errors

Number of frame transmission errors due to late collisions (for Ethernet - after the first 64B of transmission).

延迟冲突导致的帧传输错误数(对于以太网-在第一次 64B 传输之后)。

tx_heartbeat_errors

Number of Heartbeat / SQE Test errors for old half-duplex Ethernet.

旧半双工以太网的心跳/SQE 测试错误数。

总结

介绍了 IP 命令对于数据包的统计。

附录

标签:errors,tx,0232,packets,Number,rx,命令,IP,数据包
From: https://www.cnblogs.com/jiangbo4444/p/18360528

相关文章

  • Docker简介和Docker常见命令
    目录1.Docker简介1.1Docker的核心概念1.2Docker的优势1.3Docker工作流程2.常见命令2.1基本命令2.2镜像操作2.3容器操作2.4网络操作2.5卷操作2.6日志和监控2.7清理命令3.注意事项和最佳实践3.1镜像操作3.2容器操作3.3网络操作3.4卷操作3......
  • UiPath发送邮件到指定邮箱有哪些方法技巧?
    UiPath发送邮件到指定邮箱指南?UiPath邮件发送教程?UiPath作为一款功能强大的自动化工具,提供了多种方法和技巧来实现这一需求。AokSend将深入探讨UiPath发送邮件的不同方法和相关技巧,以帮助用户更高效地完成邮件发送任务。UiPath发送邮件:内容附件通过合适的模板和变量,能够让......
  • 在K8S中,Kube-Proxy为什么使用ipvs,而不使用iptables?
    Kubernetes中的kube-proxy是负责实现服务(Services)负载均衡的核心组件之一。它支持两种主要的代理模式:iptables模式和ipvs模式。这两种模式都可以用来实现服务的网络流量转发,但它们之间存在一些关键的区别。1.为什么使用ipvs而不是iptables?性能优势:连接跟踪:ipvs直......
  • 使用 TypeScript 在 React JS 中进行路由
    一.介绍单页应用程序(SPA)中的路由支持在视图之间导航,而无需重新加载应用程序。ReactRouter是React应用程序中路由的标准库。本文简要概述了使用TypeScript设置路由的方法。二.设置项目创建一个新的React项目npxcreate-react-appreact-router-ts--template......
  • 使用 JavaScript 进行线性搜索
    一.介绍线性搜索,也称为顺序搜索,是一种用于在列表中查找特定值的简单搜索算法。它的工作原理是逐个检查列表中的每个元素,直到找到所需的值或到达列表的末尾。以下是线性搜索如何工作的逐步描述。**从头开始:**从列表的第一个元素开始。**比较各个元素:**将当前元素与目标值......
  • 基本DOS命令
    打开cmd的方式:winr输入cmd打开常见DOS命令:盘符切换字母英文:查看当前目录下所有文件dir切换目录cdchangedirectorycd/dC:\Users\苟明睿\Desktopcd..上一级清理屏幕cls(clearscreen)推出终端exit查看电脑ipipconfig打开应用calcmspaintnotepad......
  • HBase学习的第三天--hbase的架构和基础命令2
    5.4 namespacehbase中没有数据库的概念,可以使用namespace来达到数据库分类别管理表的作用5.4.1 列举命名空间list_namespace5.4.2 获取命名空间描述describe_namespacedescribe_namespace'default'5.4.3 查看命名空间下的所有表list_namespace_tableslist_names......
  • 自媒体IP-起号实战班:教你如何靠打造设计个人IP,年赚到100万!
    摘要:本文旨在探讨个人品牌在自媒体平台上的构建与运营策略,以实现持续增长的个人价值和专业影响力。关键词:个人品牌,自媒体,内容运营,客户获取,转化率1.个人品牌构建的全流程方法论本节将介绍一套系统化的个人品牌构建流程,旨在帮助设计师通过自媒体平台实现个人价值的最大化......
  • CSP/NOIP计数题一些奇奇怪怪的东西
    卡特兰数常见公式:不是很懂。\[H_n=C_{2n}^n-C_{2n}^{n-1}\]应用:折线计数。第二类斯特林数在小球与盒子那道模板题中见到的,表示表示将\(n\)个两两不同的元素,划分为\(k\)个互不区分的非空子集的方案数。递推式:\[\operatorname{S2}_{i,j}=j\times\operatorname{S2}_{i-......
  • 自媒体IP-起号实战班:教你如何靠打造设计个人IP,年赚到100万!
    标题:个性化IP战略在设计领域的应用与实践**摘要:**本文旨在探讨在设计行业中如何通过构建个性化IP(IntellectualProperty)来增强设计师的市场竞争力和商业价值。通过一系列实操策略与方法的介绍,本文为设计师提供了一套系统化的个人品牌构建流程。**关键词:**个性化IP,设计行业......