what do errors, overruns, dropped and frame fields of ifconfig mean?

  • frame counts only misaligned frames, it means frames with a length not divisible by 8. Because of that length is not a valid frame and it is simply discarded.Frame errors mean CRC failures on receipt of a frame. The root cause of this could be a bad cable, or a bad interface on either the machine or the switch. Try replacing the cable, then moving to another port on the switch.The exact meaning will depend on your ethernet card and your ethernet driver. Ethernet needs to see that it has a clear line before it will try to send. Detecting that clear line is called "carrier sense". So your "carrier" would probably include any cases where the card didn't see carrier so it could not send. A drop in carrier during transmission could also be called "carrier". Your carrier field may or may not include such a drop.Ethernet calls the packets that it sends "frames". A "framing error" is when the card detects a packet that can't possibly be valid. I would expect this to certainly include frames that are not a multiple of 8 bits. It may or may include frames that are way too short or way too long. 

     frame = stats->rx_length_errors + stats->rx_over_errors + stats->rx_crc_errors + stats->rx_frame_errors 

  • Meanwhile errors counts CRC errors, too-short frames and too-long frames. stats->rx_errors

  • overruns counts that times when there is FIFO overruns, caused by the rate at which the buffer gets full and the kernel isn't able to empty it. stats->rx_fifo_errors

  • At last, dropped counts things like unintended VLAN tags or receiving IPv6 frames when the interface is not configured for IPv6. stats->rx_dropped + stats->rx_missed_errors,

       ifconfig get the statistics data from /proc/net/dev file. /proc/net/dev file comes from linux-lsk-v4.1.25\net\core\net_procfs.c.

       [References]

       浅谈/proc/net/dev的由来

 

posted @ 2019-10-26 17:06  耕读编码  阅读(256)  评论(0编辑  收藏  举报