Olivier
2007-Feb-20 23:56 UTC
[asterisk-users] How to repeat pri show span and zap show channel commands
Hi, For debugging purpose, it might be useful to repeat every 30s or so, pri show span and zap show channel commands have the results merged with /var/log/asterisk/full log file? Any better idea than running an dedicated shell script with a "asterisk -rx pri show span 1" line ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070220/b20805c8/attachment.htm
Tzafrir Cohen
2007-Feb-21 00:32 UTC
[asterisk-users] How to repeat pri show span and zap show channel commands
On Wed, Feb 21, 2007 at 07:56:18AM +0100, Olivier wrote:> Hi, > > For debugging purpose, it might be useful to repeat every 30s or so, pri > show span and zap show channel commands have the results merged with > /var/log/asterisk/full log file?Log to syslog (see the sample logger.conf), and run a cron script that does that every minute. Note: this is expected to generate a huge log file.> > Any better idea than running an dedicated shell script with a "asterisk -rx > pri show span 1" line ?Here is my pipeast script: (while read line; do echo -n "$line" # trim the ending newline sleep 0.001 # generate different write(2)-s done) | socat - /var/run/asterisk/asterisk.ctl You can pipe whatever you want to that. e.g: while true; do echo pri show span 1 sleep 30 done | pipeast Note: socat is available as a debian package: http://packages.debian.org/socat . -- Tzafrir Cohen icq#16849755 jabber:tzafrir@jabber.org +972-50-7952406 mailto:tzafrir.cohen@xorcom.com http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
Possibly Parallel Threads
- Asterisk ZAP/DAHDI reads phantom digit on overlap PRI
- Zap 1.4 error line 0: Unable to open master device '/dev/zap/ctl'
- DAHDI trouble (again) Unable to open master device '/dev/zap/ctl'
- Zap 1.4 error line 0: Unable to open
- Unable to open master device '/dev/zap/ctl'