Re: [SR-Users] stats in kamailio

2011-04-19 Thread Daniel-Constantin Mierla

Hello,

On 4/18/11 12:12 PM, Juha Heinanen wrote:

Daniel-Constantin Mierla writes:


i'm coming back to this rather old thread.  my question is, what is the
benefit (if any) of using htable to store the stats as opposed to shared
variables ($shv instead of $sht)?

the benefit of using htable is dynamic name for keys, otherwise the
shared variables are faster to access.

daniel,

thanks for your answer.  in case of statistics, the names are known in
advance,
depending, if I want to keep some counters per user, IP a.s.o, then I 
use PVs to build the name of the counter.

  so perhaps for them shared variables would be the best choice.

Note that you can define custom statistics as well:

http://kamailio.org/docs/modules/stable/modules_k/statistics.html#id3053860

It can be a better alternative when having fixed name.
Cheers,
Daniel

--
Daniel-Constantin Mierla
http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-04-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

 Here is what I do if I want to get like load stats - i.e., number of 
 events in a specific period of time. For example number of 2xx 
 transactions per minute:
 
 Load htable module and define a htable, say stats.
 
 In event_route[htable:mod-init] I set $sht(stats=2xx_transactions) =
 0;

i'm coming back to this rather old thread.  my question is, what is the
benefit (if any) of using htable to store the stats as opposed to shared
variables ($shv instead of $sht)?

-- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-04-18 Thread Daniel-Constantin Mierla



On 4/18/11 11:35 AM, Juha Heinanen wrote:

Daniel-Constantin Mierla writes:


Here is what I do if I want to get like load stats - i.e., number of
events in a specific period of time. For example number of 2xx
transactions per minute:

Load htable module and define a htable, say stats.

In event_route[htable:mod-init] I set $sht(stats=2xx_transactions) =
0;

i'm coming back to this rather old thread.  my question is, what is the
benefit (if any) of using htable to store the stats as opposed to shared
variables ($shv instead of $sht)?
the benefit of using htable is dynamic name for keys, otherwise the 
shared variables are faster to access.


Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-04-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

  i'm coming back to this rather old thread.  my question is, what is the
  benefit (if any) of using htable to store the stats as opposed to shared
  variables ($shv instead of $sht)?

 the benefit of using htable is dynamic name for keys, otherwise the 
 shared variables are faster to access.

daniel,

thanks for your answer.  in case of statistics, the names are known in
advance, so perhaps for them shared variables would be the best choice.

-- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-03-04 Thread Daniel-Constantin Mierla



On 2/27/11 5:27 AM, Juha Heinanen wrote:

Henning Westerholt writes:


kamctl fifo get_statistics all will show you all available statistics,
for a more simpler view try kamctl moni. The closest thing you'll
find regards to the load are inuse transaction, or concurrent dialogs.

tmx:inuse_transactions would be more useful if it would contain an
average over some time (1-5 minutes or something like the routers have)
rather than an instantaneous value.  but last time when i looked, it was
difficult to implement in k any kind of stat with average value.
perhaps that has now changed with sip router?
What I used, even in older versions, is to combine statistics with 
rtimer and htable. The statistics were just simple counters, holding 
integer value, incremented/decremented as wanted.


There are some stats that just increment, practically counting different 
events.


Here is what I do if I want to get like load stats - i.e., number of 
events in a specific period of time. For example number of 2xx 
transactions per minute:


Load htable module and define a htable, say stats.

In event_route[htable:mod-init] I set $sht(stats=2xx_transactions) = 0;

Load rtimer module to execute a route block every minute. In that route 
block, do this kind of logic:


$var(stats) = $stat(2xx_transactions);
$var(diff) = $var(stats) - $sht(stats=2xx_transactions);
$sht(stats=2xx_transactions) = $var(stats);

- insert in db the value of $var(diff) along with the timestamp so you 
have the number of transactions answered with 2xx during the last 
minute. Then configure siremis to make a graph out of the db records


You can have another rtimer route executed not that often that can 
delete records older than 1-2 days, so you don't fill up the database.


Cheers,
Daniel

tmx:2xx_transactions


--
Daniel-Constantin Mierla
http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-02-26 Thread Juha Heinanen
Henning Westerholt writes:

 kamctl fifo get_statistics all will show you all available statistics,
 for a more simpler view try kamctl moni. The closest thing you'll
 find regards to the load are inuse transaction, or concurrent dialogs.

tmx:inuse_transactions would be more useful if it would contain an
average over some time (1-5 minutes or something like the routers have)
rather than an instantaneous value.  but last time when i looked, it was
difficult to implement in k any kind of stat with average value.
perhaps that has now changed with sip router?

-- juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] stats in kamailio

2011-02-23 Thread Ricardo Martinez
Hello.

I’m trying to get statistics to use charts in SIREMIS v2.0.  I was able to
load the “Memory” statistics but I want to know if there is more information
to use from Kamailio,  right now I have :



$stat(used_size)

$stat(real_used_size)

$stat(max_used_size)

$stat(free_size)

$stat(location-users)

$stat(location-contacts)



Where can I find the complete list of statistics to get from kamailio?.



Thanks in advance.

Ricardo Martinez.-
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-02-23 Thread Ovidiu Sas
Each module may or may not have statistics.
Check the README file for each module that you have loaded to see what
statistics are available.
For example, here are the statistics exported by the tmx module:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/tmx.html#id2700650


Regards,
Ovidiu Sas

On Wed, Feb 23, 2011 at 2:49 PM, Ricardo Martinez
rmarti...@redvoiss.net wrote:
 Hello.

 I’m trying to get statistics to use charts in SIREMIS v2.0.  I was able to
 load the “Memory” statistics but I want to know if there is more information
 to use from Kamailio,  right now I have :



 $stat(used_size)

 $stat(real_used_size)

 $stat(max_used_size)

 $stat(free_size)

 $stat(location-users)

 $stat(location-contacts)



 Where can I find the complete list of statistics to get from kamailio?.



 Thanks in advance.

 Ricardo Martinez.-

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-02-23 Thread Ricardo Martinez
Thanks Ovidiu.
In particular is there a way to see the statistics related to the load
of the server? Or cpu used by kamailio?

Thanks
Ricardo.-

-Mensaje original-
De: sip.n...@gmail.com [mailto:sip.n...@gmail.com] En nombre de Ovidiu Sas
Enviado el: miércoles, 23 de febrero de 2011 16:52
Para: Ricardo Martinez
CC: sr-users@lists.sip-router.org
Asunto: Re: [SR-Users] stats in kamailio

Each module may or may not have statistics.
Check the README file for each module that you have loaded to see what
statistics are available.
For example, here are the statistics exported by the tmx module:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/tmx.html#id2700650


Regards,
Ovidiu Sas

On Wed, Feb 23, 2011 at 2:49 PM, Ricardo Martinez
rmarti...@redvoiss.net wrote:
 Hello.

 I’m trying to get statistics to use charts in SIREMIS v2.0.  I was able
to
 load the “Memory” statistics but I want to know if there is more
information
 to use from Kamailio,  right now I have :



 $stat(used_size)

 $stat(real_used_size)

 $stat(max_used_size)

 $stat(free_size)

 $stat(location-users)

 $stat(location-contacts)



 Where can I find the complete list of statistics to get from kamailio?.



 Thanks in advance.

 Ricardo Martinez.-

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] stats in kamailio

2011-02-23 Thread Henning Westerholt
Ricardo asked:
 In particular is there a way to see the statistics related to the load
 of the server? Or cpu used by kamailio?

Hi,

kamctl fifo get_statistics all will show you all available statistics,
for a more simpler view try kamctl moni. The closest thing you'll
find regards to the load are inuse transaction, or concurrent dialogs.

The CPU used from kamailio can be seen by normal system tools
like top.

Regards,

Henning
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users