Ethtool plugin not getting multicast packet counters properly?

Hello,
I am using ethtool input plugin to get multicast packet counters.
But it seems it does not get the right counters

ip command shows a value :

# ip -s -s link show dev ens192
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast   
    794893134  3584391  0       2664981 0       640244  
    RX errors: length   crc     frame   fifo    missed
               0        0       0       0       0       
    TX: bytes  packets  errors  dropped carrier collsns 
    691940009  3757575  0       0       0       0       
    TX errors: aborted  fifo   window heartbeat transns
               0        0       0       0       9

ethtools also shows a vlue in Rx Queue# 2 :

# ethtool -S ens192 | egrep "mcast|Queue"
     Tx Queue#: 0
       mcast pkts tx: 0
       mcast bytes tx: 0
     Tx Queue#: 1
       mcast pkts tx: 0
       mcast bytes tx: 0
     Tx Queue#: 2
       mcast pkts tx: 0
       mcast bytes tx: 0
     Tx Queue#: 3
       mcast pkts tx: 0
       mcast bytes tx: 0
     Rx Queue#: 0
       mcast pkts rx: 0
       mcast bytes rx: 0
     Rx Queue#: 1
       mcast pkts rx: 0
       mcast bytes rx: 0
     Rx Queue#: 2
       mcast pkts rx: 640066
       mcast bytes rx: 38403960
     Rx Queue#: 3
       mcast pkts rx: 0
       mcast bytes rx: 0

But telegraf plugin only shows 0 packet count.

Am I missing somethething ?

Full ethtool output is :

# ethtool -S ens192 
NIC statistics:
     Tx Queue#: 0
       TSO pkts tx: 28
       TSO bytes tx: 148343
       ucast pkts tx: 980091
       ucast bytes tx: 194329333
       mcast pkts tx: 0
       mcast bytes tx: 0
       bcast pkts tx: 752
       bcast bytes tx: 31584
       pkts tx err: 0
       pkts tx discard: 0
       drv dropped tx total: 0
          too many frags: 0
          giant hdr: 0
          hdr err: 0
          tso: 0
       ring full: 1
       pkts linearized: 0
       hdr cloned: 1006
       giant hdr: 0
     Tx Queue#: 1
       TSO pkts tx: 6287
       TSO bytes tx: 13502296
       ucast pkts tx: 1002104
       ucast bytes tx: 208075353
       mcast pkts tx: 0
       mcast bytes tx: 0
       bcast pkts tx: 0
       bcast bytes tx: 0
       pkts tx err: 0
       pkts tx discard: 0
       drv dropped tx total: 0
          too many frags: 0
          giant hdr: 0
          hdr err: 0
          tso: 0
       ring full: 0
       pkts linearized: 0
       hdr cloned: 659
       giant hdr: 0
     Tx Queue#: 2
       TSO pkts tx: 64
       TSO bytes tx: 433179
       ucast pkts tx: 892170
       ucast bytes tx: 145726407
       mcast pkts tx: 0
       mcast bytes tx: 0
       bcast pkts tx: 0
       bcast bytes tx: 0
       pkts tx err: 0
       pkts tx discard: 0
       drv dropped tx total: 0
          too many frags: 0
          giant hdr: 0
          hdr err: 0
          tso: 0
       ring full: 0
       pkts linearized: 0
       hdr cloned: 877
       giant hdr: 0
     Tx Queue#: 3
       TSO pkts tx: 35
       TSO bytes tx: 183368
       ucast pkts tx: 893225
       ucast bytes tx: 145790499
       mcast pkts tx: 0
       mcast bytes tx: 0
       bcast pkts tx: 0
       bcast bytes tx: 0
       pkts tx err: 0
       pkts tx discard: 0
       drv dropped tx total: 0
          too many frags: 0
          giant hdr: 0
          hdr err: 0
          tso: 0
       ring full: 0
       pkts linearized: 0
       hdr cloned: 509
       giant hdr: 0
     Rx Queue#: 0
       LRO pkts rx: 2443
       LRO byte rx: 28030251
       ucast pkts rx: 750672
       ucast bytes rx: 354665371
       mcast pkts rx: 0
       mcast bytes rx: 0
       bcast pkts rx: 5634
       bcast bytes rx: 338040
       pkts rx OOB: 0
       pkts rx err: 0
       drv dropped rx total: 499187
          err: 499187
          fcs: 0
       rx buf alloc fail: 0
     Rx Queue#: 1
       LRO pkts rx: 685
       LRO byte rx: 3039781
       ucast pkts rx: 599955
       ucast bytes rx: 107990342
       mcast pkts rx: 0
       mcast bytes rx: 0
       bcast pkts rx: 24
       bcast bytes rx: 2208
       pkts rx OOB: 0
       pkts rx err: 0
       drv dropped rx total: 18937
          err: 18937
          fcs: 0
       rx buf alloc fail: 0
     Rx Queue#: 2
       LRO pkts rx: 606
       LRO byte rx: 2147058
       ucast pkts rx: 597538
       ucast bytes rx: 103834332
       mcast pkts rx: 642157
       mcast bytes rx: 38529420
       bcast pkts rx: 0
       bcast bytes rx: 0
       pkts rx OOB: 0
       pkts rx err: 0
       drv dropped rx total: 886560
          err: 886560
          fcs: 0
       rx buf alloc fail: 0
     Rx Queue#: 3
       LRO pkts rx: 644
       LRO byte rx: 2685781
       ucast pkts rx: 998581
       ucast bytes rx: 191116389
       mcast pkts rx: 0
       mcast bytes rx: 0
       bcast pkts rx: 0
       bcast bytes rx: 0
       pkts rx OOB: 0
       pkts rx err: 0
       drv dropped rx total: 1260208
          err: 1260208
          fcs: 0
       rx buf alloc fail: 0
     tx timeout count: 0

Any idea ?
Thanks !
JS

Hi!

Can you please show what information Telegraf is reporting? Telegraf uses go-psutil to find most of the system hardware information so it will probably go back to looking at how it handles this, but I want to see what you are getting first.

Also what version of telegraf are you using?

Thanks!

Hello @jpowers,

Can you please show what information Telegraf is reporting?

I am not sure how to to this apart from querying influxdb where I can see some data is missing. Can I run telegraf input plugin in some debug mode ?

Telegraf uses go-psutil to find most of the system hardware information

I think it is using ethtools in this particular instance. This is why I sent ethtools output.

I am using Telegraf 1.22.0

Thanks for your help
Jean-Sébastien

I am not sure how to to this apart from querying influxdb where I can see some data is missing. Can I run telegraf input plugin in some debug mode ?

Use the [[outputs.file]] output to print the metrics directly to stdout.

I think it is using ethtools in this particular instance. This is why I sent ethtools output.

ethtool is a primarily a linux specific tool, while gopsutil is meant to be a cross-platform go library to collect data. In most cases, it will parse system-level data found in places like /sys and /proc on linux systems.