This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

K2HK: Gigabit Ethernet statistics

Expert 1800 points

Hello,

We would like to read the Port 0 and Port 1 TX/RX statistics.

We are using ethtool -S eth0  command to read the statistics as described in MCSDK_UG_Chapter_Exploring.

The following is the output 

~ # ethtool -S eth0
NIC statistics:
CPSW_A:rx_good_frames: 17455570
CPSW_A:rx_broadcast_frames: 33757
CPSW_A:rx_multicast_frames: 6
CPSW_A:rx_pause_frames: 0
CPSW_A:rx_crc_errors: 0
CPSW_A:rx_align_code_errors: 0
CPSW_A:rx_oversized_frames: 0
CPSW_A:rx_jabber_frames: 0
CPSW_A:rx_undersized_frames: 0
CPSW_A:rx_fragments: 0
CPSW_A:rx_bytes: 1958071771
CPSW_A:tx_good_frames: 26806335
CPSW_A:tx_broadcast_frames: 652268
CPSW_A:tx_multicast_frames: 0
CPSW_A:tx_pause_frames: 0
CPSW_A:tx_deferred_frames: 0
CPSW_A:tx_collision_frames: 0
CPSW_A:tx_single_coll_frames: 0
CPSW_A:tx_mult_coll_frames: 0
CPSW_A:tx_excessive_collisions: 0
CPSW_A:tx_late_collisions: 0
CPSW_A:tx_underrun: 0
CPSW_A:tx_carrier_sense_errors: 0
CPSW_A:tx_bytes: 5236032719
CPSW_A:tx_64byte_frames: 107588
CPSW_A:tx_65_to_127byte_frames: 21486787
CPSW_A:tx_128_to_255byte_frames: 17001923
CPSW_A:tx_256_to_511byte_frames: 5613104
CPSW_A:tx_512_to_1023byte_frames: 4994
CPSW_A:tx_1024byte_frames: 47509
CPSW_A:net_bytes: 7194104490
CPSW_A:rx_sof_overruns: 0
CPSW_A:rx_mof_overruns: 0
CPSW_A:rx_dma_overruns: 0
CPSW_B:rx_good_frames: 26806335
CPSW_B:rx_broadcast_frames: 652268
CPSW_B:rx_multicast_frames: 0
CPSW_B:rx_pause_frames: 0
CPSW_B:rx_crc_errors: 0
CPSW_B:rx_align_code_errors: 0
CPSW_B:rx_oversized_frames: 0
CPSW_B:rx_jabber_frames: 0
CPSW_B:rx_undersized_frames: 0
CPSW_B:rx_fragments: 0
CPSW_B:rx_bytes: 5236032719
CPSW_B:tx_good_frames: 17455570
CPSW_B:tx_broadcast_frames: 33757
CPSW_B:tx_multicast_frames: 6
CPSW_B:tx_pause_frames: 0
CPSW_B:tx_deferred_frames: 0
CPSW_B:tx_collision_frames: 0
CPSW_B:tx_single_coll_frames: 0
CPSW_B:tx_mult_coll_frames: 0
CPSW_B:tx_excessive_collisions: 0
CPSW_B:tx_late_collisions: 0
CPSW_B:tx_underrun: 0
CPSW_B:tx_carrier_sense_errors: 0
CPSW_B:tx_bytes: 1958071771
CPSW_B:tx_64byte_frames: 107588
CPSW_B:tx_65_to_127byte_frames: 21486787
CPSW_B:tx_128_to_255byte_frames: 17001923
CPSW_B:tx_256_to_511byte_frames: 5613104
CPSW_B:tx_512_to_1023byte_frames: 4994
CPSW_B:tx_1024byte_frames: 47509
CPSW_B:net_bytes: 7194104490
CPSW_B:rx_sof_overruns: 0
CPSW_B:rx_mof_overruns: 0
CPSW_B:rx_dma_overruns: 0
CPSW_C:rx_good_frames: 0
CPSW_C:rx_broadcast_frames: 0
CPSW_C:rx_multicast_frames: 0
CPSW_C:rx_pause_frames: 0
CPSW_C:rx_crc_errors: 0
CPSW_C:rx_align_code_errors: 0
CPSW_C:rx_oversized_frames: 0
CPSW_C:rx_jabber_frames: 0
CPSW_C:rx_undersized_frames: 0
CPSW_C:rx_fragments: 0
CPSW_C:rx_bytes: 0
CPSW_C:tx_good_frames: 0
CPSW_C:tx_broadcast_frames: 0
CPSW_C:tx_multicast_frames: 0
CPSW_C:tx_pause_frames: 0
CPSW_C:tx_deferred_frames: 0
CPSW_C:tx_collision_frames: 0
CPSW_C:tx_single_coll_frames: 0
CPSW_C:tx_mult_coll_frames: 0
CPSW_C:tx_excessive_collisions: 0
CPSW_C:tx_late_collisions: 0
CPSW_C:tx_underrun: 0
CPSW_C:tx_carrier_sense_errors: 0
CPSW_C:tx_bytes: 0
CPSW_C:tx_64byte_frames: 0
CPSW_C:tx_65_to_127byte_frames: 0
CPSW_C:tx_128_to_255byte_frames: 0
CPSW_C:tx_256_to_511byte_frames: 0
CPSW_C:tx_512_to_1023byte_frames: 0
CPSW_C:tx_1024byte_frames: 0
CPSW_C:net_bytes: 0
CPSW_C:rx_sof_overruns: 0
CPSW_C:rx_mof_overruns: 0
CPSW_C:rx_dma_overruns: 0
CPSW_D:rx_good_frames: 0
CPSW_D:rx_broadcast_frames: 0
CPSW_D:rx_multicast_frames: 0
CPSW_D:rx_pause_frames: 0
CPSW_D:rx_crc_errors: 0
CPSW_D:rx_align_code_errors: 0
CPSW_D:rx_oversized_frames: 0
CPSW_D:rx_jabber_frames: 0
CPSW_D:rx_undersized_frames: 0
CPSW_D:rx_fragments: 0
CPSW_D:rx_bytes: 0
CPSW_D:tx_good_frames: 0
CPSW_D:tx_broadcast_frames: 0
CPSW_D:tx_multicast_frames: 0
CPSW_D:tx_pause_frames: 0
CPSW_D:tx_deferred_frames: 0
CPSW_D:tx_collision_frames: 0
CPSW_D:tx_single_coll_frames: 0
CPSW_D:tx_mult_coll_frames: 0
CPSW_D:tx_excessive_collisions: 0
CPSW_D:tx_late_collisions: 0
CPSW_D:tx_underrun: 0
CPSW_D:tx_carrier_sense_errors: 0
CPSW_D:tx_bytes: 0
CPSW_D:tx_64byte_frames: 0
CPSW_D:tx_65_to_127byte_frames: 0
CPSW_D:tx_128_to_255byte_frames: 0
CPSW_D:tx_256_to_511byte_frames: 0
CPSW_D:tx_512_to_1023byte_frames: 0
CPSW_D:tx_1024byte_frames: 0
CPSW_D:net_bytes: 0
CPSW_D:rx_sof_overruns: 0
CPSW_D:rx_mof_overruns: 0
CPSW_D:rx_dma_overruns: 0

It is not clear how to check Port0 TX/RX and Port 1 TX/RX statistics

.  There was already a post  .  But this was not answered.

Regards

Rams

  • Hi Rams,
    Sorry for the delayed response on this, actually I'm working for that post.
    Could you please refer to the Gigbit ethernet user guide "sprugv9d" for port register access.
    "Gigabit Ethernet (GbE) switch module"
    Table 3.2, page no 82.
    Table 3-31 page no 110.
    Chapter 2.3.4.1 page no 39.
  • Hello,

    Thanks for the response.  Actually, after referring the GbE  documentation "sprugv9d", we were not clear how do we match with the stats with what we get from ethtool command.

    Does TI has any tool to dump the stats registers for Port 0 and Port 1?

    Regards

    Rams