<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi John,<br>
<br>
I tried to reproduce this on live system and I do not see this
difference:<br>
<br>
tester001:~# opensipsctl fifo get_statistics usrloc:<br>
<font color="#cc0000"><b>usrloc:registered_users = 53</b></font><br>
usrloc:location-users = 53<br>
usrloc:location-contacts = 56<br>
usrloc:location-expires = 84<br>
tester001:~# opensipsctl ul show --brief | wc -l<br>
<font color="#cc0000"><b>54</b></font><br>
<br>
Also running with DB mode 2.<br>
<br>
The counter is decremented when a contact is removed from memory
hash.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
On 06/27/2011 06:00 PM, John Quick wrote:
<blockquote
cite="mid:004b01cc34da$f9ef82c0$edce8840$@smartvox.co.uk"
type="cite">
<pre wrap="">Yes.
John
-----Original Message-----
From: Bogdan-Andrei Iancu [<a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
Sent: 27 June 2011 14:49
To: <a class="moz-txt-link-abbreviated" href="mailto:john.quick@smartvox.co.uk">john.quick@smartvox.co.uk</a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>
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:
</pre>
<blockquote type="cite">
<pre wrap="">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:: <a class="moz-txt-link-abbreviated" href="mailto:1002@suse-sip.com">1002@suse-sip.com</a>
Contact:: <a class="moz-txt-link-freetext" href="sip:1002@192.168.0.60:6050">sip:1002@192.168.0.60:6050</a> 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:: <a class="moz-txt-link-abbreviated" href="mailto:1003@suse-sip.com">1003@suse-sip.com</a>
Contact:: <a class="moz-txt-link-freetext" href="sip:1003@192.168.0.67:5060;transport=udp">sip:1003@192.168.0.67:5060;transport=udp</a> 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 [<a class="moz-txt-link-freetext" href="mailto:bogdan@opensips.org">mailto:bogdan@opensips.org</a>]
Sent: 25 June 2011 12:51
To: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>; 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:
</pre>
<blockquote type="cite">
<pre wrap="">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<a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>
Subject: Re: [OpenSIPS-Users] SNMPStats - openserSIPRegCurrentUsers is
        always incrementing
To: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>
Message-ID:<a class="moz-txt-link-rfc2396E" href="mailto:4E049560.5020706@opensips.org"><4E049560.5020706@opensips.org></a>
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:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">time.
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS solutions and "know-how"</pre>
</body>
</html>