Hi all
I'm trying to get the number of registered subscribers in a kamailio 3.0.4 setup.
I'm trying to use usrloc's exported function "ul_get_num_users" but I get a 500 error:
kamctl fifo ul_get_num_users 500 command 'ul_get_num_users' not available
Using get_statistics I get:
test3:~# kamctl fifo get_statistics usrloc: usrloc:registered_users = 2 usrloc:location-users = 2 usrloc:location-contacts = 2 usrloc:location-expires = 0
Trying to query for a specific stat, seems like I do not use the correct syntax:
test3:~# kamctl fifo get_statistics usrloc:registered_users 404 Statistics Not Found
Anyone could help me with the correct syntax for the function and fifo?
thanks
On 11/24/2010 04:02 AM, Jon Bonilla (Manwe) wrote:
test3:~# kamctl fifo get_statistics usrloc:registered_users 404 Statistics Not Found
Try:
kamctl fifo get_statistics usrloc::registered_users
El Wed, 24 Nov 2010 04:09:22 -0500 Alex Balashov abalashov@evaristesys.com escribió:
kamctl fifo get_statistics usrloc::registered_users
Thanks!
El Wed, 24 Nov 2010 10:15:35 +0100 Jon Bonilla (Manwe) manwe@aholab.ehu.es escribió:
El Wed, 24 Nov 2010 04:09:22 -0500 Alex Balashov abalashov@evaristesys.com escribió:
kamctl fifo get_statistics usrloc::registered_users
Looks like there's a stupid-trivial bug:
test3:~# kamctl fifo get_statistics usrloc::location-contacts dialog:location-contacts = 0
Instead of usrloc:location-contacts = 0
I get dialog:location-contacts = 0
Is there any exported function or statistics to count the total number of users (not only registered ones)?
On 11/24/2010 04:39 AM, Jon Bonilla (Manwe) wrote:
El Wed, 24 Nov 2010 10:15:35 +0100 Jon Bonilla (Manwe)manwe@aholab.ehu.es escribió:
El Wed, 24 Nov 2010 04:09:22 -0500 Alex Balashovabalashov@evaristesys.com escribió:
kamctl fifo get_statistics usrloc::registered_users
Looks like there's a stupid-trivial bug:
test3:~# kamctl fifo get_statistics usrloc::location-contacts dialog:location-contacts = 0
Hmmm... not for me:
diminuendo-1:/u/home/sasha# kamctl fifo get_statistics usrloc::registered_users usrloc:registered_users = 0
(Running git master HEAD ad7f00d840082989132f335914aa0db223a0e46e)
Is there any exported function or statistics to count the total number of users (not only registered ones)?
Can't you just do a SELECT count(*) FROM your 'subscriber' table?
El Wed, 24 Nov 2010 05:03:11 -0500 Alex Balashov abalashov@evaristesys.com escribió:
Looks like there's a stupid-trivial bug:
test3:~# kamctl fifo get_statistics usrloc::location-contacts dialog:location-contacts = 0
Hmmm... not for me:
diminuendo-1:/u/home/sasha# kamctl fifo get_statistics usrloc::registered_users usrloc:registered_users = 0
(Running git master HEAD ad7f00d840082989132f335914aa0db223a0e46e)
I'm running 3.0.4 stable. Anyways I think it started after retrieving stats from dialog module. I'll try to catch how to reproduce it. Anyways it's trivial.
Is there any exported function or statistics to count the total number of users (not only registered ones)?
Can't you just do a SELECT count(*) FROM your 'subscriber' table?
Sure. I was just wondering if kamailio had that feature.
Thanks Alex.
2010/11/24 Jon Bonilla manwe@aholab.ehu.es:
I'm running 3.0.4 stable. Anyways I think it started after retrieving stats from dialog module. I'll try to catch how to reproduce it. Anyways it's trivial.
If the problem occurs after retrieving dialog module status then it could be not so trivial.
El Wed, 24 Nov 2010 13:14:52 +0100 Iñaki Baz Castillo ibc@aliax.net escribió:
If the problem occurs after retrieving dialog module status then it could be not so trivial.
Some more info:
I looked at my history and looks like I was right about dialog module:
test3:~# kamctl fifo get_statistics usrloc::registered_users usrloc:registered_users = 2
test3:~# kamctl fifo get_statistics :dialog::active_dialogs dialog:active_dialogs = 0
test3:~# kamctl fifo get_statistics usrloc: usrloc:registered_users = 1 usrloc:location-users = 1 usrloc:location-contacts = 1 usrloc:location-expires = 1
test3:~# kamctl fifo get_statistics usrloc::location-contacts dialog:location-contacts = 1
It started after retrieving stats from dialog.
If I restart kamailio I still get the wrong output:
test3:~# kamctl fifo get_statistics usrloc::location-users dialog:location-users = 1
test3:~# /etc/init.d/kamailio restart Restarting kamailio: kamailioloading modules under /usr/lib/kamailio/modules_k:/usr/lib/kamailio/modules Listening on udp: 77.77.77.77 [77.77.77.77]:5060 udp: 127.0.0.1:5060 tcp: 77.77.77.77 [77.77.77.77]:5060 Aliases:
. test3:~# kamctl fifo get_statistics usrloc::location-users dialog:location-users = 1