<div dir="ltr"><div>AFAIR, in perfquery and libibmad, there is only support for reading PortSamplesControl not writing it. Also, I think reading PortSamplesResult is missing. The support that's currently there was mainly to get the Tick value so PortXmitWait could be made more meaningful.</div><div><br></div><div>There were issues with the use of the sampling counter(s) so AFAIK no one uses them. Performance monitoring is done by using the (mostly) free running (mandatory and if available optional) counters.</div><div><br></div><div>-- Hal</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 12:29 PM, Black.S <span dir="ltr"><<a href="mailto:Black.S52@yandex.com" target="_blank">Black.S52@yandex.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>12.01.2016 20:40, Black.S пишет:<br>
    </div>
    <blockquote type="cite">
      
      <div>11.01.2016 23:59, Coulter, Susan K
        пишет:<br>
      </div><div><div class="h5">
      <blockquote type="cite">
        
        <div><br>
        </div>
        The perfquery command will tell you about the throughput and
        errors on a port.
        <div>The smpquery command will tell you more of what
          you might want to know about a port.</div>
        <div>They come from the infiniband-diags module / RPM.</div>
        <div>Examples are below.</div>
        <div><br>
        </div>
        <div>Another option is to use the PerfMgr which is part
          of the OpenSM code base, if you are running osm on a host.</div>
        <div>There is an example of that below too, using the
          default port/localhost.</div>
        <div><br>
        </div>
        <div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">[root@mu-master ~]# perfquery 199 1</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"># Port counters: Lid 199 port 1 (CapMask: 0x1400)</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortSelect:......................1</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">CounterSelect:...................0x0000</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">SymbolErrorCounter:..............0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkErrorRecoveryCounter:........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkDownedCounter:...............0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvErrors:...................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvRemotePhysicalErrors:.....0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvSwitchRelayErrors:........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortXmitDiscards:................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortXmitConstraintErrors:........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvConstraintErrors:.........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">CounterSelect2:..................0x00</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LocalLinkIntegrityErrors:........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">ExcessiveBufferOverrunErrors:....0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VL15Dropped:.....................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortXmitData:....................4294967295</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvData:.....................4294967295</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortXmitPkts:....................4294967295</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortRcvPkts:.....................4294967295</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PortXmitWait:....................<a href="tel:2503387680" target="_blank" value="+12503387680">2503387680</a></div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><br>
          </div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><br>
          </div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">[root@mu-master ~]# smpquery pi -L 199</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"># Port info: Lid 199 port 0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">Mkey:............................<not
            displayed></div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">GidPrefix:.......................0xfe80000000000000</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">Lid:.............................199</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">SMLid:...........................250</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">CapMask:.........................0x2510868</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsTrapSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsAutomaticMigrationSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsSLMappingSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsSystemImageGUIDsupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsCommunicatonManagementSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsVendorClassSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsCapabilityMaskNoticeSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap"></span>IsClientRegistrationSupported</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">DiagCode:........................0x0000</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">MkeyLeasePeriod:.................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LocalPort:.......................1</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkWidthEnabled:................1X or 4X</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkWidthSupported:..............1X or 4X</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkWidthActive:.................4X</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedSupported:..............2.5 Gbps or 5.0
            Gbps or 10.0 Gbps</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkState:.......................Active</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PhysLinkState:...................LinkUp</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkDownDefState:................Polling</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">ProtectBits:.....................2</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LMC:.............................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedActive:.................10.0 Gbps</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedEnabled:................2.5 Gbps or 5.0
            Gbps or 10.0 Gbps</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">NeighborMTU:.....................4096</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">SMSL:............................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VLCap:...........................VL0-3</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">InitType:........................0x00</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VLHighLimit:.....................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VLArbHighCap:....................8</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VLArbLowCap:.....................8</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">InitReply:.......................0x00</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">MtuCap:..........................4096</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">VLStallCount:....................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">HoqLife:.........................31</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">OperVLs:.........................VL0-3</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PartEnforceInb:..................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PartEnforceOutb:.................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">FilterRawInb:....................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">FilterRawOutb:...................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">MkeyViolations:..................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">PkeyViolations:..................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">QkeyViolations:..................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">GuidCap:.........................128</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">ClientReregister:................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">McastPkeyTrapSuppressionEnabled:.0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">SubnetTimeout:...................18</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">RespTimeVal:.....................16</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LocalPhysErr:....................8</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">OverrunErr:......................8</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">MaxCreditHint:...................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">RoundTrip:.......................0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">CapabilityMask2:.................0x0000</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedExtActive:..............No Extended Speed</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedExtSupported:...........0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px">LinkSpeedExtEnabled:.............0</div>
          <div style="margin:0px;font-family:Menlo;font-size:11px"><br>
          </div>
        </div>
        <div style="margin:0px;font-family:Menlo;font-size:11px"><br>
        </div>
        <div style="margin:0px;font-family:Menlo;font-size:11px">
          <div style="margin:0px">[root@mu-master ~]# telnet
            localhost 10000</div>
          <div style="margin:0px">Trying 127.0.0.1...</div>
          <div style="margin:0px">Connected to localhost.</div>
          <div style="margin:0px">Escape character is '^]'.</div>
          <div style="margin:0px">OpenSM $ ?</div>
          <div style="margin:0px">? : Command not found</div>
          <div style="margin:0px;min-height:13px"><br>
          </div>
          <div style="margin:0px">Supported commands and
            syntax:</div>
          <div style="margin:0px">help [<command>]</div>
          <div style="margin:0px">quit (not valid in local
            mode; use ctl-c)</div>
          <div style="margin:0px">loglevel
            [<log-level>]</div>
          <div style="margin:0px">permodlog</div>
          <div style="margin:0px">priority
            [<sm-priority>]</div>
          <div style="margin:0px">resweep [heavy|light]</div>
          <div style="margin:0px">reroute</div>
          <div style="margin:0px">sweep [on|off]</div>
          <div style="margin:0px">status [loop]</div>
          <div style="margin:0px">logflush [on|off] -- toggle
            opensm.log file flushing</div>
          <div style="margin:0px">querylid lid -- print
            internal information about the lid specified</div>
          <div style="margin:0px">portstatus
            [ca|switch|router]</div>
          <div style="margin:0px">switchbalance [verbose]
            [guid]</div>
          <div style="margin:0px">lidbalance [switchguid]</div>
          <div style="margin:0px">dump_conf</div>
          <div style="margin:0px">update_desc</div>
          <div style="margin:0px">version -- print the OSM
            version</div>
          <div style="margin:0px">perfmgr(pm) [enable|disable</div>
          <div style="margin:0px">            
            |clear_counters|dump_counters|print_counters(pc)|print_errors(pe)</div>
          <div style="margin:0px">            
            |set_rm_nodes|clear_rm_nodes|clear_inactive</div>
          <div style="margin:0px">            
            |set_query_cpi|clear_query_cpi</div>
          <div style="margin:0px">            
            |dump_redir|clear_redir</div>
          <div style="margin:0px">            
            |sweep|sweep_time[seconds]]</div>
          <div style="margin:0px">dump_portguid [file
            filename] regexp1 [regexp2 [regexp3 ...]] -- Dump port GUID
            matching a regexp </div>
          <div><br>
          </div>
        </div>
        <div><br>
        </div>
        <div><br>
          <div>
            <blockquote type="cite">
              <div>On Dec 26, 2015, at 12:40 PM, Black.S <<a href="mailto:Black.S52@yandex.com" target="_blank"><a href="mailto:Black.S52@yandex.com" target="_blank">Black.S52@yandex.com</a>>

                wrote:</a></div>
              <br>
              <div><br>
                <br>
                Hello all<br>
                <br>
                I want to monitoring ports in IB fabric.<br>
                <br>
                I happened to notice in the out of perfquery some
                counter like a ticks<br>
                and port sampling. Its will be great for accurate
                monitoring. But I cant<br>
                found some info about setup and using sampling controi
                for IB ports.<br>
                <br>
                How to configure and use sampling contol for IB ports?
                Can anybody give<br>
                me documentations/links or examples? I cant found it In
                Google.<br>
                Are there any restrictions on the amount of data
                collected in this<br>
                sampling mode?<br>
                <br>
                If its offtop then redirect me please<br>
                <br>
                Thanks for you time<br>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a href="mailto:Users@lists.openfabrics.org" target="_blank">Users@lists.openfabrics.org</a><br>
                <a href="http://lists.openfabrics.org/mailman/listinfo/users" target="_blank">http://lists.openfabrics.org/mailman/listinfo/users</a><br>
              </div>
            </blockquote>
          </div>
          <br>
          <div>
            <div style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
              <div style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
                <div>==================================================</div>
                <div>Susan Coulter</div>
                <div>HPC Network Technical Lead</div>
                <div><a href="tel:%28505%29%20667-8425" target="_blank" value="+15056678425">(505) 667-8425</a></div>
                <div>“Once in a while you get shown the light</div>
                <div>    In the strangest of places if you look
                  at it right”  <i>Robert Hunter</i></div>
                <div>==================================================</div>
                <div><br>
                </div>
              </div>
              <br>
            </div>
            <br>
            <br>
          </div>
          <br>
        </div>
      </blockquote></div></div>
      Hi  Susan Coulter<br>
      <br>
      Very thanks for your reply<br>
      <br>
      Very interesting and especially for perfmon. How I understand the
      perfmon can dump all counters very fast (i hope it more fast then
      dump it in cycle one by one). Thanks for this info.<br>
      <br>
      But nevertheless, can your or somebody explain how to use sampling
      control mechanism for perfquery ?<br>
      <span lang="en"><span><i>"</i></span><i>perfqery </i><i><span>-c, --smplctl</span></i><i> </i><i><span>show port samples control"</span></i></span><br>
      <br>
      <p><span lang="en"><span><span lang="en"><span>in this mode</span>, I would like <span>to collect</span> <span>all
                available</span> <span>counters of</span> <span>the IB port</span> <span>with
                time stamp provided by "</span><span>tick" <span lang="en"><span><span lang="en"> <span>counter</span></span></span></span></span>
              <span>from the device.</span><br>
              <span></span></span></span></span></p>
      <p><span lang="en"><span><span lang="en"><span>The time stamp</span> form tick counter will
              <span lang="en"><span>allows
                  not</span> <span>depending on time from </span></span><span>host which collect counters from IB port .<br>
              </span></span></span></span></p>
      <p><span lang="en"><span><span lang="en"><span>Sorry for my english<br>
              </span></span></span></span></p>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openfabrics.org">Users@lists.openfabrics.org</a><br>
<a href="http://lists.openfabrics.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.openfabrics.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>