[openib-general] port num in port priv

Hal Rosenstock halr at voltaire.com
Fri Feb 10 07:57:35 PST 2006


Hi Suri,

On Fri, 2006-02-10 at 09:09, Suresh Shelvapille wrote:
> Hal:
> The way I gather port stats locally on my device is by doing a "cat" on the
> "/sys/class/Infiniband/mysw/port/0/counters" file. As Roland mentioned this
> is limited to port0 counters on a switch. 

Base switch port 0 does not support PortCounters; only enhanced switch
port 0.

> If I need stats for port#N I need to expand this by providing more class
> attributes and getting to them that way....

Switches are a little different than HCAs in terms of this so you may
want to change the model.

> I am not using user space verbs library, is there any other way to get at
> the different port#N stats?

Yes, by sending the appropriate PerfMgt Get for PortCounters to the
local LID (of port 0) with the the PortSelect component set to the
switch external port you want and decoding the GetResp. That's what the
perfquery tool does. Your switch needs to support PMA for this to work.

-- Hal

> Thanks,
> Suri
> 
>  
> > The PMA counters are gathered by a tool named perfquery. Port number is
> > in the PortSelect component of the PMA attribute. You can't get PMA
> > counters until the port is active.
> > 
> > -- Hal
> 




More information about the general mailing list