<!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">
<br>
<br>
On 2/27/11 5:27 AM, Juha Heinanen wrote:
<blockquote cite="mid:19817.53926.642580.981441@sip.test.fi"
type="cite">
<pre wrap="">Henning Westerholt writes:
</pre>
<blockquote type="cite">
<pre wrap="">"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.
</pre>
</blockquote>
<pre wrap="">
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?
</pre>
</blockquote>
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.<br>
<br>
There are some stats that just increment, practically counting
different events.<br>
<br>
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:<br>
<br>
Load htable module and define a htable, say stats.<br>
<br>
In event_route[htable:mod-init] I set
$sht(stats=>2xx_transactions) = 0;<br>
<br>
Load rtimer module to execute a route block every minute. In that
route block, do this kind of logic:<br>
<br>
$var(stats) = $stat(2xx_transactions);<br>
$var(diff) = $var(stats) - $sht(stats=>2xx_transactions);<br>
$sht(stats=>2xx_transactions) = $var(stats);<br>
<br>
- 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<br>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<span style="color: rgb(102, 51, 51); font-family: Arial; font-size:
12px;"><span style="color: rgb(0, 0, 102);">tmx:2xx_transactions<br>
</span></span><br>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</body>
</html>