|Summary:||ASTERISK-07117: [patch] output of 'asterisk -rx "show xxxx"' gets chopped|
|Reporter:||Phoebe Anderson (phoebe)||Labels:|
|Date Opened:||2006-06-07 10:48:30||Date Closed:||2006-06-12 22:58:21|
|Environment:||Attachments:||( 0) 7305.patch|
|Description:||As in summary.|
|Comments:||By: Russell Bryant (russell) 2006-06-07 11:10:00|
This patch will probably fix it for you ...
By: Phoebe Anderson (phoebe) 2006-06-07 12:57:46
The patch didn't work. I took a look at asterisk.c and noticed that the patch only seems to remove a portion that is surrounded by ifdef Darwin, so it seemed to make no difference anyway.
Intrestingly enough, if you create a bash script with the following:
asterisk -rx "show channels" > /dev/null
asterisk -rx "show channels"
Then you actually get the expected output about 9 times out of 10.
By: Russell Bryant (russell) 2006-06-07 13:03:14
What platform is this? If it is a mac, then you are correct, the patch would make no difference. Otherwise, it would cause it to use different code.
By: Phoebe Anderson (phoebe) 2006-06-07 15:02:02
It's on two different Linux boxes, one intel running FC1 and one AMD running FC4.
By: Serge Vecher (serge-v) 2006-06-07 15:34:27
fwiw, I can reproduce this with trunk r32798 on FC5.
I don't get only one line, like sinistermidget does, but output is hacked nevertheless.
By: Phoebe Anderson (phoebe) 2006-06-07 16:20:47
Intrestingly enough, I just tested it on a Dell2650 2-cpu box and I can't reproduce the result. It works perfectly.
By: Tim Kelly (timkelly1980) 2006-06-09 16:31:17
I am getting this on a DELL running a fresh installation of debian-sarge.
By: Brett Crapser (cmdrcody) 2006-06-10 04:28:07
Another data point... Slackware 10.0/1 Hmmmm... I don't remember
Linux 2.4.26 #1 SMP i686 GNU/Linux (Dual P III 600MHz) Latest SVN of
Asterisk trunk 33419.
When I run my 'documentation' script, I do multiple 'show' commands.
First is always 'asterisk -rx "show version" > version.txt'. Works
fine (except as below). Next is 'asterisk -rx "show version files" >
fileversion.txt' and it always stops at 4088 bytes. Next is 'asterisk -rx
"help" > help.txt' and it always stops at 4088 bytes. And so on. If the
display is less than 4088, it seems to come out OK. If larger it seems to
limit at 4088 or LESS (which is really weird).
Looks to me like a buffer limit.
Also - if the command completes - I get the -
'Verbosity is at least 3
-- Remote UNIX connection
at the end of each file. If it does not complete - well I can't get that
far 8-) I always thought the ' --Remote UNIX connection' was only supposed
to display on the console of the running Asterisk???
By: Tim Kelly (timkelly1980) 2006-06-10 12:41:53
See also 0007326: asterisk -rx "EXTENSIONS RELOAD" locks up -> related?
By: Russell Bryant (russell) 2006-06-11 16:35:57
Can the people reporting problems here please try the attached patch and see if it changes the behavior you are seeing?
By: Tim Kelly (timkelly1980) 2006-06-11 18:01:56
The patch fixed it for me thanx :)
By: Brett Crapser (cmdrcody) 2006-06-12 00:34:28
Russell - the patch allows the command to run to completion.
It did before the patch as well - I just didn't get the data.
After reviewing my 'notes' - all is good.
By: Serge Vecher (serge-v) 2006-06-12 09:25:32
Russel's patch also fixes a problem on a trunk FC5 system.
By: Russell Bryant (russell) 2006-06-12 22:58:20
fixed in 1.2 and trunk in revisions 33753 and 33754