Which /sys/class/infiniband counters are you referring to ? I suspect that you're asking about the ones in PortExtendedCounters attribute (which include 64 bit versions of the data counters in PortCounters and some unicast/multicast ones). If so, this is optional on a per device basis and these only show up for devices which support them. I don't have a list of all Mellanox HCAs and switches as to whether or not they are supported but it's easy to tell (via perfquery -x (or --extended)) directed at port in question. If it responds with counters, then they should show up in /sys/class/infiniband on the machine which contains that port.
↧