isc-projects / ethq

Ethernet NIC Queue stats viewer
Mozilla Public License 2.0
102 stars 15 forks source link

Lots of unused queues are displayed, output doesn't fit the screen #1

Closed vstax closed 5 years ago

vstax commented 5 years ago

Thanks for the product. I found a small usability problem. Driver for Intel X540-AT2 NIC creates 64 queues regardless amount of CPU cores. This is ethtool output on 12-core system:

# ethtool -i enp3s0f0
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x80000389
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
# ethtool -S enp3s0f0
NIC statistics:
     rx_packets: 22054047
     tx_packets: 943793
     rx_bytes: 33156295164
     tx_bytes: 115009716
     rx_pkts_nic: 22054047
     tx_pkts_nic: 943793
     rx_bytes_nic: 33244511352
     tx_bytes_nic: 122960366
     lsc_int: 1
     tx_busy: 0
     non_eop_descs: 0
     rx_errors: 0
     tx_errors: 0
     rx_dropped: 0
     tx_dropped: 0
     multicast: 0
     broadcast: 27
     rx_no_buffer_count: 0
     collisions: 0
     rx_over_errors: 0
     rx_crc_errors: 0
     rx_frame_errors: 0
     hw_rsc_aggregated: 0
     hw_rsc_flushed: 0
     fdir_match: 22053275
     fdir_miss: 1
     fdir_overflow: 0
     rx_fifo_errors: 0
     rx_missed_errors: 0
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     tx_fifo_errors: 0
     tx_heartbeat_errors: 0
     tx_timeout_count: 0
     tx_restart_queue: 0
     rx_length_errors: 0
     rx_long_length_errors: 0
     rx_short_length_errors: 0
     tx_flow_control_xon: 0
     rx_flow_control_xon: 0
     tx_flow_control_xoff: 0
     rx_flow_control_xoff: 0
     rx_csum_offload_errors: 0
     alloc_rx_page: 6588
     alloc_rx_page_failed: 0
     alloc_rx_buff_failed: 0
     rx_no_dma_resources: 0
     os2bmc_rx_by_bmc: 0
     os2bmc_tx_by_bmc: 0
     os2bmc_tx_by_host: 0
     os2bmc_rx_by_host: 0
     tx_hwtstamp_timeouts: 0
     tx_hwtstamp_skipped: 0
     rx_hwtstamp_cleared: 0
     tx_ipsec: 0
     rx_ipsec: 0
     fcoe_bad_fccrc: 0
     rx_fcoe_dropped: 0
     rx_fcoe_packets: 0
     rx_fcoe_dwords: 0
     fcoe_noddp: 0
     fcoe_noddp_ext_buff: 0
     tx_fcoe_packets: 0
     tx_fcoe_dwords: 0
     tx_queue_0_packets: 81722
     tx_queue_0_bytes: 9776048
     tx_queue_1_packets: 60527
     tx_queue_1_bytes: 8698666
     tx_queue_2_packets: 77702
     tx_queue_2_bytes: 9505872
     tx_queue_3_packets: 85591
     tx_queue_3_bytes: 9919471
     tx_queue_4_packets: 86341
     tx_queue_4_bytes: 9941158
     tx_queue_5_packets: 62708
     tx_queue_5_bytes: 8687592
     tx_queue_6_packets: 84776
     tx_queue_6_bytes: 10088368
     tx_queue_7_packets: 88161
     tx_queue_7_bytes: 9971582
     tx_queue_8_packets: 80113
     tx_queue_8_bytes: 9542556
     tx_queue_9_packets: 62585
     tx_queue_9_bytes: 8840666
     tx_queue_10_packets: 86154
     tx_queue_10_bytes: 9916644
     tx_queue_11_packets: 87413
     tx_queue_11_bytes: 10121093
     tx_queue_12_packets: 0
     tx_queue_12_bytes: 0
     tx_queue_13_packets: 0
     tx_queue_13_bytes: 0
     tx_queue_14_packets: 0
     tx_queue_14_bytes: 0
     tx_queue_15_packets: 0
     tx_queue_15_bytes: 0
     tx_queue_16_packets: 0
     tx_queue_16_bytes: 0
     tx_queue_17_packets: 0
     tx_queue_17_bytes: 0
     tx_queue_18_packets: 0
     tx_queue_18_bytes: 0
     tx_queue_19_packets: 0
     tx_queue_19_bytes: 0
     tx_queue_20_packets: 0
     tx_queue_20_bytes: 0
     tx_queue_21_packets: 0
     tx_queue_21_bytes: 0
     tx_queue_22_packets: 0
     tx_queue_22_bytes: 0
     tx_queue_23_packets: 0
     tx_queue_23_bytes: 0
     tx_queue_24_packets: 0
     tx_queue_24_bytes: 0
     tx_queue_25_packets: 0
     tx_queue_25_bytes: 0
     tx_queue_26_packets: 0
     tx_queue_26_bytes: 0
     tx_queue_27_packets: 0
     tx_queue_27_bytes: 0
     tx_queue_28_packets: 0
     tx_queue_28_bytes: 0
     tx_queue_29_packets: 0
     tx_queue_29_bytes: 0
     tx_queue_30_packets: 0
     tx_queue_30_bytes: 0
     tx_queue_31_packets: 0
     tx_queue_31_bytes: 0
     tx_queue_32_packets: 0
     tx_queue_32_bytes: 0
     tx_queue_33_packets: 0
     tx_queue_33_bytes: 0
     tx_queue_34_packets: 0
     tx_queue_34_bytes: 0
     tx_queue_35_packets: 0
     tx_queue_35_bytes: 0
     tx_queue_36_packets: 0
     tx_queue_36_bytes: 0
     tx_queue_37_packets: 0
     tx_queue_37_bytes: 0
     tx_queue_38_packets: 0
     tx_queue_38_bytes: 0
     tx_queue_39_packets: 0
     tx_queue_39_bytes: 0
     tx_queue_40_packets: 0
     tx_queue_40_bytes: 0
     tx_queue_41_packets: 0
     tx_queue_41_bytes: 0
     tx_queue_42_packets: 0
     tx_queue_42_bytes: 0
     tx_queue_43_packets: 0
     tx_queue_43_bytes: 0
     tx_queue_44_packets: 0
     tx_queue_44_bytes: 0
     tx_queue_45_packets: 0
     tx_queue_45_bytes: 0
     tx_queue_46_packets: 0
     tx_queue_46_bytes: 0
     tx_queue_47_packets: 0
     tx_queue_47_bytes: 0
     tx_queue_48_packets: 0
     tx_queue_48_bytes: 0
     tx_queue_49_packets: 0
     tx_queue_49_bytes: 0
     tx_queue_50_packets: 0
     tx_queue_50_bytes: 0
     tx_queue_51_packets: 0
     tx_queue_51_bytes: 0
     tx_queue_52_packets: 0
     tx_queue_52_bytes: 0
     tx_queue_53_packets: 0
     tx_queue_53_bytes: 0
     tx_queue_54_packets: 0
     tx_queue_54_bytes: 0
     tx_queue_55_packets: 0
     tx_queue_55_bytes: 0
     tx_queue_56_packets: 0
     tx_queue_56_bytes: 0
     tx_queue_57_packets: 0
     tx_queue_57_bytes: 0
     tx_queue_58_packets: 0
     tx_queue_58_bytes: 0
     tx_queue_59_packets: 0
     tx_queue_59_bytes: 0
     tx_queue_60_packets: 0
     tx_queue_60_bytes: 0
     tx_queue_61_packets: 0
     tx_queue_61_bytes: 0
     tx_queue_62_packets: 0
     tx_queue_62_bytes: 0
     tx_queue_63_packets: 0
     tx_queue_63_bytes: 0
     rx_queue_0_packets: 1879587
     rx_queue_0_bytes: 2824704268
     rx_queue_1_packets: 1605596
     rx_queue_1_bytes: 2414035786
     rx_queue_2_packets: 1739877
     rx_queue_2_bytes: 2615924266
     rx_queue_3_packets: 1948219
     rx_queue_3_bytes: 2929272470
     rx_queue_4_packets: 1969383
     rx_queue_4_bytes: 2960921496
     rx_queue_5_packets: 1659593
     rx_queue_5_bytes: 2494943068
     rx_queue_6_packets: 1900478
     rx_queue_6_bytes: 2857285286
     rx_queue_7_packets: 2014254
     rx_queue_7_bytes: 3028583420
     rx_queue_8_packets: 1812790
     rx_queue_8_bytes: 2725865836
     rx_queue_9_packets: 1607875
     rx_queue_9_bytes: 2416655362
     rx_queue_10_packets: 1961013
     rx_queue_10_bytes: 2948536148
     rx_queue_11_packets: 1955382
     rx_queue_11_bytes: 2939567758
     rx_queue_12_packets: 0
     rx_queue_12_bytes: 0
     rx_queue_13_packets: 0
     rx_queue_13_bytes: 0
     rx_queue_14_packets: 0
     rx_queue_14_bytes: 0
     rx_queue_15_packets: 0
     rx_queue_15_bytes: 0
     rx_queue_16_packets: 0
     rx_queue_16_bytes: 0
     rx_queue_17_packets: 0
     rx_queue_17_bytes: 0
     rx_queue_18_packets: 0
     rx_queue_18_bytes: 0
     rx_queue_19_packets: 0
     rx_queue_19_bytes: 0
     rx_queue_20_packets: 0
     rx_queue_20_bytes: 0
     rx_queue_21_packets: 0
     rx_queue_21_bytes: 0
     rx_queue_22_packets: 0
     rx_queue_22_bytes: 0
     rx_queue_23_packets: 0
     rx_queue_23_bytes: 0
     rx_queue_24_packets: 0
     rx_queue_24_bytes: 0
     rx_queue_25_packets: 0
     rx_queue_25_bytes: 0
     rx_queue_26_packets: 0
     rx_queue_26_bytes: 0
     rx_queue_27_packets: 0
     rx_queue_27_bytes: 0
     rx_queue_28_packets: 0
     rx_queue_28_bytes: 0
     rx_queue_29_packets: 0
     rx_queue_29_bytes: 0
     rx_queue_30_packets: 0
     rx_queue_30_bytes: 0
     rx_queue_31_packets: 0
     rx_queue_31_bytes: 0
     rx_queue_32_packets: 0
     rx_queue_32_bytes: 0
     rx_queue_33_packets: 0
     rx_queue_33_bytes: 0
     rx_queue_34_packets: 0
     rx_queue_34_bytes: 0
     rx_queue_35_packets: 0
     rx_queue_35_bytes: 0
     rx_queue_36_packets: 0
     rx_queue_36_bytes: 0
     rx_queue_37_packets: 0
     rx_queue_37_bytes: 0
     rx_queue_38_packets: 0
     rx_queue_38_bytes: 0
     rx_queue_39_packets: 0
     rx_queue_39_bytes: 0
     rx_queue_40_packets: 0
     rx_queue_40_bytes: 0
     rx_queue_41_packets: 0
     rx_queue_41_bytes: 0
     rx_queue_42_packets: 0
     rx_queue_42_bytes: 0
     rx_queue_43_packets: 0
     rx_queue_43_bytes: 0
     rx_queue_44_packets: 0
     rx_queue_44_bytes: 0
     rx_queue_45_packets: 0
     rx_queue_45_bytes: 0
     rx_queue_46_packets: 0
     rx_queue_46_bytes: 0
     rx_queue_47_packets: 0
     rx_queue_47_bytes: 0
     rx_queue_48_packets: 0
     rx_queue_48_bytes: 0
     rx_queue_49_packets: 0
     rx_queue_49_bytes: 0
     rx_queue_50_packets: 0
     rx_queue_50_bytes: 0
     rx_queue_51_packets: 0
     rx_queue_51_bytes: 0
     rx_queue_52_packets: 0
     rx_queue_52_bytes: 0
     rx_queue_53_packets: 0
     rx_queue_53_bytes: 0
     rx_queue_54_packets: 0
     rx_queue_54_bytes: 0
     rx_queue_55_packets: 0
     rx_queue_55_bytes: 0
     rx_queue_56_packets: 0
     rx_queue_56_bytes: 0
     rx_queue_57_packets: 0
     rx_queue_57_bytes: 0
     rx_queue_58_packets: 0
     rx_queue_58_bytes: 0
     rx_queue_59_packets: 0
     rx_queue_59_bytes: 0
     rx_queue_60_packets: 0
     rx_queue_60_bytes: 0
     rx_queue_61_packets: 0
     rx_queue_61_bytes: 0
     rx_queue_62_packets: 0
     rx_queue_62_bytes: 0
     rx_queue_63_packets: 0
     rx_queue_63_bytes: 0
     tx_pb_0_pxon: 0
     tx_pb_0_pxoff: 0
     tx_pb_1_pxon: 0
     tx_pb_1_pxoff: 0
     tx_pb_2_pxon: 0
     tx_pb_2_pxoff: 0
     tx_pb_3_pxon: 0
     tx_pb_3_pxoff: 0
     tx_pb_4_pxon: 0
     tx_pb_4_pxoff: 0
     tx_pb_5_pxon: 0
     tx_pb_5_pxoff: 0
     tx_pb_6_pxon: 0
     tx_pb_6_pxoff: 0
     tx_pb_7_pxon: 0
     tx_pb_7_pxoff: 0
     rx_pb_0_pxon: 0
     rx_pb_0_pxoff: 0
     rx_pb_1_pxon: 0
     rx_pb_1_pxoff: 0
     rx_pb_2_pxon: 0
     rx_pb_2_pxoff: 0
     rx_pb_3_pxon: 0
     rx_pb_3_pxoff: 0
     rx_pb_4_pxon: 0
     rx_pb_4_pxoff: 0
     rx_pb_5_pxon: 0
     rx_pb_5_pxoff: 0
     rx_pb_6_pxon: 0
     rx_pb_6_pxoff: 0
     rx_pb_7_pxon: 0
     rx_pb_7_pxoff: 0

Output of ethq on terminal with 38 lines looks like this - "summary" output is cut:

 ixgbe:enp3s0f0                        2018-10-02 13:07:13

 Queue   TX packets   RX packets     TX bytes     RX bytes
 ----- ------------ ------------ ------------ ------------
     0            0            0            0            0
     1            0            0            0            0
     2            0            0            0            0
     3            0            0            0            0
     4            0            0            0            0
     5            0            0            0            0
     6            0            0            0            0
     7            0            0            0            0
     8            0            0            0            0
     9            0            0            0            0
    10            0            0            0            0
    11            0            0            0            0
    12            0            0            0            0
    13            0            0            0            0
    14            0            0            0            0
    15            0            0            0            0
    16            0            0            0            0
    17            0            0            0            0
    18            0            0            0            0
    19            0            0            0            0
    20            0            0            0            0
    21            0            0            0            0
    22            0            0            0            0
    23            0            0            0            0
    24            0            0            0            0
    25            0            0            0            0
    26            0            0            0            0
    27            0            0            0            0
    28            0            0            0            0
    29            0            0            0            0
    30            0            0            0            0
    31            0            0            0            0
    32            0            0            0            0

I think it should either ignore queues that are always zero (beyond the number of CPU cores), or always reserve last few lines for summary output, effectively cutting off few queues from bottom when the terminal window doesn't have enough lines for all queues + summary.

raybellis commented 5 years ago

Thanks for the report - I wouldn't like to have to reserve space at the bottom of the screen, but I'll consider ways in which I can ignore queues that have no data in them.

raybellis commented 5 years ago

Could you please try the latest commit?

vstax commented 5 years ago

Yes, thanks - it works fine now.

raybellis commented 5 years ago

Fixed by 932c5d5c07ebbd7e3f11fba8531558d19bef5ea1