<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body 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
      "opensipsct ul show"<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 12.01.2016 21:01, Husnain Taseer
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALkA4hLdm88Vg23j2rdnebzaii3PcBbBZQPYedRMZ_5fk0KoNQ@mail.gmail.com"
      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
                moz-do-not-send="true" href="mailto:bogdan@opensips.org"
                target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a></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 moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                <div>
                  <div class="h5">
                    <div>On 12.01.2016 12:09, Husnain Taseer wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div class="h5">
                      <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 'usrloc:'</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 "opensipsctl  monitor" 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 moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
  </body>
</html>