What are meanings of fields in /proc/net/dev?

后端 未结 3 1979
鱼传尺愫
鱼传尺愫 2021-02-02 09:44

The Linux file /proc/net/dev reads like this:

[me@host ~]$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |         


        
3条回答
  •  一个人的身影
    2021-02-02 10:47

    You can have a look at net/core/dev.c in the source tree to see what it means:

    seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
           "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
           dev->name,
           stats->rx_bytes,
           stats->rx_packets,
           stats->rx_errors,
           stats->rx_dropped + stats->rx_missed_errors,
           stats->rx_fifo_errors,
           stats->rx_length_errors + stats->rx_over_errors +
            stats->rx_crc_errors + stats->rx_frame_errors,
           stats->rx_compressed,
           stats->multicast,
           stats->tx_bytes,
           stats->tx_packets,
           stats->tx_errors,
           stats->tx_dropped,
           stats->tx_fifo_errors,
           stats->collisions,
           stats->tx_carrier_errors + stats->tx_aborted_errors +
            stats->tx_window_errors + stats->tx_heartbeat_errors,
           stats->tx_compressed);
    

    So:

    • receive errors means any kind of invalid packet, e.g. invalid length or invalid checksum
    • transmit errors are
      • carrier errors
      • aborted errors
      • window errors
      • heartbeat errors
        (whatever they all mean)

    And yes, I think drops means when the device dropped a packet because it ran out of buffer space.

提交回复
热议问题