<div dir="ltr">Hi Bogdan,<div>Actually we have 2 registrar servers in production environment half of the users are registered with one server and other half on the second server so whenever inbound call from PSTN comes to our SBC, The SBC check the user in location table of both opensips servers and then route call to the server on which user is present. so if I change the db_mode to some other value my SBC routing will be disturbed, as entry persist in location table for sometimes. </div><div><br></div><div>Well Thanks for you response I&#39;ll use some other way to get the stats of registered users.</div><div><br></div><div>Regards,</div><div>Husnain Taseer</div><div>VoIP Developer</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 12:55 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Husnain,<br>
      <br>
      The statistics (for usrloc) are computed based on the in-memory
      (cached) data. In db_mode 3 (db only), there is nothing cached in
      memory, so not statistics.<br>
      <br>
      if you want statistics, use db_mode 1 or 2 ; mode 1 updates the db
      table in realtime, but has a performance penalty ; mode 2 is the
      most efficient, but DB has a lag in terms of being updated - in
      this case, better fetch data via MI directly from cache - see the
      &quot;opensipsct ul show&quot;<br>
      <br>
      Regards,<br>
    </tt><span class="">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    </span><div><div class="h5"><div>On 12.01.2016 21:01, Husnain Taseer
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hello Bogdan,</div>
        Yes, I m using db_mode=3 because in case of cache (other db_mode
        values) when user was getting un-registered it was not clearing
        the status of the user and entry was still present for some time
        in location table.<br>
        <br>
        Regards,
        <div>Husnain</div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Jan 12, 2016 at 8:33 PM,
            Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Husnain,<br>
                  <br>
                  Are you using db_mode=3 for usrloc module ?<br>
                  <br>
                  Regards,<br>
                </tt>
                <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                <div>
                  <div>
                    <div>On 12.01.2016 12:09, Husnain Taseer wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div>
                      <div dir="ltr">Dear Users,
                        <div><br>
                        </div>
                        <div>I am using Server:: OpenSIPS (2.1.1
                          (x86_64/linux)) as a registrar server where
                          more than 20 users are registered and I can
                          see their entries in location table. but when
                          I run fifo commands to see the statistics it
                          shows me 0 registered users:<br>
                          <br>
                          <br>
                          <div>[root@opensips ]# opensipsctl fifo
                            get_statistics &#39;usrloc:&#39;</div>
                          <div>usrloc:registered_users:: 0</div>
                          <div>usrloc:location-users:: 0</div>
                          <div>usrloc:location-contacts:: 0</div>
                          <div>usrloc:location-expires:: 0</div>
                        </div>
                        <div><br>
                          <br>
                          and the output of &quot;opensipsctl  monitor&quot; is : </div>
                        <div>
                          <div><br>
                          </div>
                          <div>[cycle #: 5; if constant make sure server
                            lives]</div>
                          <div>Server:: OpenSIPS (2.1.1 (x86_64/linux))</div>
                          <div>Now:: Tue Jan 12 16:13:14 2016</div>
                          <div>Up since:: Mon Jan 11 20:17:19 2016</div>
                          <div>Up time:: 71755 [sec]</div>
                          <div><br>
                          </div>
                          <div>Transaction Statistics:</div>
                          <div>tm:UAS_transactions:: 2011</div>
                          <div>tm:UAC_transactions:: 14222</div>
                          <div>tm:inuse_transactions:: 0</div>
                          <div><br>
                          </div>
                          <div>Stateless Server Statistics:</div>
                          <div>sl:sent_replies:: 258651</div>
                          <div>sl:sent_err_replies:: 15</div>
                          <div>sl:received_ACKs:: 979</div>
                          <div><br>
                          </div>
                          <div>UsrLoc Stats:</div>
                          <div>usrloc:registered_users:: 0</div>
                          <div>usrloc:location-users:: 0</div>
                          <div>usrloc:location-contacts:: 0</div>
                          <div>usrloc:location-expires:: 0</div>
                          <div><br>
                          </div>
                        </div>
                        <div><br>
                        </div>
                        <div>Please advise</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>Regards,</div>
                        <div>Husnain Taseer</div>
                        <div>VoIP Developer</div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div>