Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-27 Thread Tzafrir Cohen
On Fri, Apr 25, 2014 at 11:48:42AM +0100, A J Stiles wrote: On Thursday 24 Apr 2014, Mikael Fredin wrote: I will look into netcat as well, thank you There's not much to look into, really! It's just a command-line tool for connecting STDIN and STDOUT to a network socket. $ echo -e

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-25 Thread A J Stiles
On Thursday 24 Apr 2014, Mikael Fredin wrote: I will look into netcat as well, thank you There's not much to look into, really! It's just a command-line tool for connecting STDIN and STDOUT to a network socket. $ echo -e WIBBLE\nWIBBLE\nWIBBLE | nc somehost.co.uk 3245 will send WIBBLE WIBBLE

[asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Mikael Fredin
Just like the subject sais - how expensive is it to execute a lot of these commands to keep track of different things in asterisk? I have avoided doing this because it feels a bit like a risk to spam the asterisk CLI this way, but is it really? CPU-wise it doesn't seem very expensive to do it

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Scott Griepentrog
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). Commands that display information about every active channel, for example sip show peers, may slow other processing significantly because

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Tzafrir Cohen
On Thu, Apr 24, 2014 at 12:20:37PM +0200, Mikael Fredin wrote: Just like the subject sais - how expensive is it to execute a lot of these commands to keep track of different things in asterisk? I have avoided doing this because it feels a bit like a risk to spam the asterisk CLI this way,

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Scott Griepentrog
That's a good point also - if you're doing something automated, AMI is likely a better option. The connection to Asterisk is persistent, and information output is structured and we take pains not to break the API definition, which is not true of CLI output. On Thu, Apr 24, 2014 at 12:47 PM,

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Mikael Fredin
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? What would you suggest be better ways to monitor asterisk information? On 24

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Mikael Fredin
I will look into netcat as well, thank you On 24 April 2014 19:47, Tzafrir Cohen tzafrir.co...@xorcom.com wrote: On Thu, Apr 24, 2014 at 12:20:37PM +0200, Mikael Fredin wrote: Just like the subject sais - how expensive is it to execute a lot of these commands to keep track of different

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Mikael Fredin
Ah read your reply too late, yeah I will look into using the AMI. On 24 April 2014 20:58, Scott Griepentrog sgriepent...@digium.com wrote: That's a good point also - if you're doing something automated, AMI is likely a better option. The connection to Asterisk is persistent, and information

Re: [asterisk-users] Asterisk -rx, how expensive is it? Should you avoid spamming it?

2014-04-24 Thread Scott Griepentrog
The Stasis message bus and caching is introduced in Asterisk 12. https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+API+Improvements Note that as it's fairly new, in some cases older code may still lock data structures during operations rather than read the cache. You will also want to see if