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.-
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 rmartinez@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
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.nslu@gmail.com [mailto:sip.nslu@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 rmartinez@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
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
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
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
On Friday 04 March 2011, Daniel-Constantin Mierla wrote:
[..]
- 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.
Hi Daniel,
really interesting solution, we use some external scripts which works somehow similar - but an internal solution is of course more elegant.
Cheers,
Henning
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
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 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
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
regarding tmx:inuse_transactions stat, it does not seem to exist among tm.stats:
# sip-proxy_ctl tm.stats { current: 0 waiting: 0 total: 8 total_local: 0 replied_locally: 2 6xx: 0 5xx: 0 4xx: 1 3xx: 0 2xx: 7 created: 8 freed: 8 delayed_free: 0 }
or does it have the same value as created - freed?
-- juha
Juha Heinanen writes:
regarding tmx:inuse_transactions stat, it does not seem to exist among tm.stats:
...
or does it have the same value as created - freed?
a took a look at the code and tmx inuse_transactions seems to be equal to tm current transactions.
-- juha
Hi Juha,
On 3/1/11 9:34 AM, Juha Heinanen wrote:
Juha Heinanen writes:
regarding tmx:inuse_transactions stat, it does not seem to exist among tm.stats:
...
or does it have the same value as created - freed?
a took a look at the code and tmx inuse_transactions seems to be equal to tm current transactions.
you are right, I saw your email but I forgot to answer it. SER core, sl & tm exported more stats in regard to transactions and replies, so I kept that version when we integrated and exported them via K stats API.
Cheers, Daniel