Hi John,

I tried to reproduce this on live system and I do not see this difference:

tester001:~# opensipsctl fifo get_statistics usrloc:
*usrloc:registered_users = 53*
usrloc:location-users = 53
usrloc:location-contacts = 56
usrloc:location-expires = 84
tester001:~# opensipsctl ul show --brief  | wc -l
*54*

Also running with DB mode 2.

The counter is decremented when a contact is removed from memory hash.

Regards,
Bogdan

On 06/27/2011 06:00 PM, John Quick wrote:
Yes.

John

-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:[email protected]]
Sent: 27 June 2011 14:49
To: [email protected]
Cc: [email protected]
Subject: Re: [OpenSIPS-Users] SNMPStats - openserSIPRegCurrentUsers is
always incrementing

Hi John,

So you are saying that "opensipsctl ul show" shows only 2 records while the
statistic shows more ??

Regards,
Bogdan

On 06/25/2011 10:37 PM, John Quick wrote:
Bogdan,

Here is a snippet showing the significant parts from the script that I
use for handling REGISTER requests, but I think there is only one line
that is unusual.
        
modparam("usrloc", "nat_bflag", 6)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 1)
modparam("registrar", "default_q", 800) modparam("registrar",
"received_avp", "$avp(s:rcv)")

      sl_send_reply("100", "Trying");
        
      if (client_nat_test("2")) {
        setbflag(6);
        fix_nated_register();
        force_rport();
      }
      if (!aaa_www_authorize("")) {
          www_challenge("","0");
          exit;
      };
      if (!db_check_to()) {
          sl_send_reply("401", "Unauthorized");
          exit;
      };

      consume_credentials();

      if (!save("location")) {
          log(1, "***--REGISTER: location save failed!\n");
          sl_reply_error();
      }

In case the consume_credentials() function was causing the fault, I
repeated my tests with that line commented out. However, the counter
is still going up.

There is no "ul dump" option in opensipsctl, but there is a "ul show"
function. It shows the correct information:
[root@centos6v log]# opensipsctl fifo get_statistics usrloc:
usrloc:registered_users = 3
usrloc:aliases-users = 0
usrloc:aliases-contacts = 0
usrloc:aliases-expires = 0
usrloc:location-users = 3
usrloc:location-contacts = 2
usrloc:location-expires = 1

[root@centos6v log]# opensipsctl ul show
Domain:: location table=512 records=2
          AOR:: [email protected]
                  Contact:: sip:[email protected]:6050 Q=1
                          Expires:: 3551
                          Callid:: 3c2670ace4cd-m9fekwu548ay
                          Cseq:: 6
                          User-agent:: snom360/7.3.30
                          State:: CS_SYNC
                          Flags:: 0
                          Cflag:: 0
                          Socket:: udp:192.168.0.116:5060
                          Methods:: 7999
          AOR:: [email protected]
                  Contact:: sip:[email protected]:5060;transport=udp Q=0.8
                          Expires:: 3288
                          Callid:: b939e48a7188d2cf
                          Cseq:: 4400
                          User-agent:: Aastra 6731i/2.6.0.1008
                          State:: CS_SYNC
                          Flags:: 0
                          Cflag:: 0
                          Socket:: udp:192.168.0.116:5060
                          Methods:: 7807
Domain:: aliases table=512 records=0

John

-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:[email protected]]
Sent: 25 June 2011 12:51
To: [email protected]; John Quick
Subject: Re: [OpenSIPS-Users] SNMPStats - openserSIPRegCurrentUsers is
always incrementing

Hi John,

As the statistic is know to work well, I suspect something strange
with your setup (like re-registrations are actually new registers).
So, in the same time, please check the content of user location via:
           opensipsctl ul dump

Just to see the actual records.

Regards,
Bogdan

On 06/24/2011 06:15 PM, John Quick wrote:
Hi Bogdan
Yes, I can confirm that registered_users shows the same value through
the fifo get_statistics request and the SNMP MIB value. The statistic
that appears to show the correct number of registered users is
usrloc:location-contacts

Here is the complete list of usrloc statistics on my test server
today
- only one UA is registered at the moment:
# opensipsctl fifo get_statistics usrloc:
usrloc:registered_users = 14
usrloc:aliases-users = 0
usrloc:aliases-contacts = 0
usrloc:aliases-expires = 0
usrloc:location-users = 14
usrloc:location-contacts = 1
usrloc:location-expires = 13

Sorry I cannot maintain the thread on this reply - I am only
receiving digests from this forum and have forgotten my login details
so cannot change it.

John Quick

Message: 2
Date: Fri, 24 Jun 2011 16:47:12 +0300
From: Bogdan-Andrei Iancu<[email protected]>
Subject: Re: [OpenSIPS-Users] SNMPStats - openserSIPRegCurrentUsers is
        always incrementing
To: [email protected]
Message-ID:<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi John,

That stat is related to the internal statistic "registered_users"
provided by the usrloc module. Can you confirm that "opensipsctl fifo
get_statistics registered_users" gives thesame value as via SNMP ?

Regards,
Bogdan


On 06/23/2011 12:49 PM, John Quick wrote:
Using SNMPStats with version 1.6.2 of OpenSIPS, the value reported
for openserSIPRegCurrentUsers does not indicate the number of UA's
currently registered. It shows a value that is always increasing
over
time.
I am testing with 3 registered devices. There are three records in
the location table. However, openserSIPRegCurrentUsers now has a
value of
12 and it increments by 1 approximately every 20 minutes. I would
guess it is showing the cumulative total number of registrations,
not the current number of registered users.


--
Bogdan-Andrei Iancu
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to