<div dir="ltr"><div class="gmail_default" style="color:rgb(102,0,0)">The Stasis message bus and caching is introduced in Asterisk 12. <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements">https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements</a> Note that as it's fairly new, in some cases older code may still lock data structures during operations rather than read the cache.</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div><div class="gmail_default" style="color:rgb(102,0,0)">You will also want to see if ARI (<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI">https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI</a>) can provide what you need. This is newer code and more likely to use the cache and be efficient.</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 2:12 PM, Mikael Fredin <span dir="ltr"><<a href="mailto:mikael@wiraya.com" target="_blank">mikael@wiraya.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you, that's very useful information! Does the same go for issuing a "sip show peers" through the AMI? And do you know where I could find information of what asterisk versions may use cached information instead?<div>
<br></div><div>What would you suggest be better ways to monitor asterisk information?<br><div><br></div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On 24 April 2014 17:58, Scott Griepentrog <span dir="ltr"><<a href="mailto:sgriepentrog@digium.com" target="_blank">sgriepentrog@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="color:rgb(102,0,0)">How much Asterisk is affected depends on both how often you run a command, and even more significantly, what command you run (and which version of Asterisk).</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div><div class="gmail_default" style="color:rgb(102,0,0)">Commands that display information about every active channel, for example "sip show peers", may slow other processing significantly because they have to briefly lock the data structures to insure valid information. There have been improvements in more recent versions of Asterisk that reduce the negative affects of this by looking at cached information instead of locking everything.</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div><div class="gmail_default" style="color:rgb(102,0,0)">On the other hand, requesting specific information (sip show peer X) or more generic information (sip show inuse) will have much less affect on other activity in Asterisk.</div>
<div class="gmail_default" style="color:rgb(102,0,0)"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Thu, Apr 24, 2014 at 5:20 AM, Mikael Fredin <span dir="ltr"><<a href="mailto:mikael@wiraya.com" target="_blank">mikael@wiraya.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Just like the subject sais - how expensive is it to execute a lot of these commands to keep track of different things in asterisk?<br>
<br></div>I have avoided doing this because it feels a bit like a risk to spam the asterisk CLI this way, but is it really?<br>
<br></div>CPU-wise it doesn't seem very expensive to do it 100 times a second (from a simple test I did), but is it possible it will affect the asterisk service in any other negative way?<br><br></div>Regards,<br>Mikael<br>
</div>
<br></div></div><span><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><span><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br><div dir="ltr">
<img alt="Digium logo" src="https://my.digium.com/images/graphics/digium_RGB_signature.gif" width="288" height="50" style="font-size:12px;font-family:Arial,Helvetica,sans-serif"><div>Scott Griepentrog<br>
Digium, Inc · Software Developer<br>445 Jan Davis Drive NW · Huntsville, AL 35806 · US<br>direct/fax: <a href="tel:%2B1%20256%20428%206239" value="+12564286239" target="_blank">+1 256 428 6239</a> · mobile: <a href="tel:%2B1%20317%20507%204029" value="+13175074029" target="_blank">+1 317 507 4029</a><br>
Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> · <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br>
</div></div>
</font></span></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">
<img alt="Digium logo" src="https://my.digium.com/images/graphics/digium_RGB_signature.gif" width="288" height="50" style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"><div>Scott Griepentrog<br>
Digium, Inc · Software Developer<br>445 Jan Davis Drive NW · Huntsville, AL 35806 · US<br>direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029<br>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> · <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br>
</div></div>
</div>