[Freeswitch-users] Request to test fs_cli batchmode and new logging/capture script.

Mitch Capper mitch.capper at gmail.com
Mon Feb 27 19:18:08 MSK 2012


I have worked in a logging/debugging tool for users to use when they
are trying to have their situation debugged or file a bug report.  The
script collects output from freeswitch (events, sip traces, console
messages) etc and can pastebin them or put them in a file.  It also
can automatically obfuscate sensitive information in the log files to
make people working on production systems or with live data to feel
more comfortable with submitting their logs.


I am trying to find people to do two things:
1) Run a patched version of fs_cli and make sure its as stable as
ever, without the batchmode flag (-b) people should see no change,  to
do this if you can just from your freeswitch source dir:
wget "http://jira.freeswitch.org/secure/attachment/15730/fs_cli_batchmode_v8.patch"
patch -p1 < fs_cli_batchmode_v8.patch

and then compile and use freeswitch as normal (if you prefer to have
the mofied fs_cli moved to another location see below)  to revert back
at any time just run:
git checkout libs/esl/fs_cli.c
and all changes are reverted

At this point just use fs_cli(if you can test with the -b mode, no
autocomplete or colors but other than that should work like normal) as
long as it doesn't have any issues please comment in
http://jira.freeswitch.org/browse/FS-3188 that you found it stable

2) To test the fs_logger.pl script,  this script does not require perl
support to be compiled into freeswitch, any different perl modules to
run, or any external dependencies on any platform other than fs_cli to
be in the same directory as the script or in its normal location
(/usr/local/freeswitch/bin/fs_cli or the respective windows location).
 It should work on all platforms including windows.   For windows
users without perl you can also try the compiled version of the
logging script at http://mitchcapper.com/fs_logger.exe  .   NOTE THIS
SCRIPT will only work if you have the batchmode patch applied to
source.  For windows users who do not want to recompile that version
of fs_cli can be found at https://mitchcapper.com/fs_cli.exe (just put
it in the same directory as the script).
For linux users you can easily test in a separate environment by doing
the following:
FINAL_DIR=/root/fs_cli_test/
mkdir ${FINAL_DIR}
wget "http://jira.freeswitch.org/secure/attachment/15730/fs_cli_batchmode_v8.patch"
patch -p1 < fs_cli_batchmode_v8.patch
cd libs/esl/ && make && cp ./fs_cli ${FINAL_DIR} && cd ${FINAL_DIR}
wget "http://jira.freeswitch.org/secure/attachment/15935/fs_logger.pl"
"http://jira.freeswitch.org/secure/attachment/15936/fs_logger.txt"
chmod +x fs_logger.pl

This will put the modified version of fs_cli in /root/fs_cli_test
along with the fs_logger.pl script and its readme in the same folder.

If you wish to just download the script/readme they are located at:
http://jira.freeswitch.org/secure/attachment/15935/fs_logger.pl
http://jira.freeswitch.org/secure/attachment/15936/fs_logger.txt  or
in freeswitch-contrib/mitchcapper/fs_logger.*  .

fs_logger.txt has some details on usage, along with just running
fs_logger.pl without args will show the usage information.  fs_logger
takes all args that fs_cli takes along with a few of its own.   To do
a sample run you can do: "./fs_logger.pl -oa -A"  that will do the
autos (input and output shown to simulate fs_cli, obfuscate the log
output and pastebin the result).  if you do not want it pastebined
just do "./fs_logger.pl -oa -f test.log -ia -do"   the ia and do are
most useful to test as they are most likely to fail (they make
fs_logger.pl interactive to more closely imitate fs_cli)

The ticket for fs_logger.pl is http://jira.freeswitch.org/browse/FS-3945

If you run into issues or have any feedback with either please reply
here and will be happy to help, thanks for testing and hopefully this
will allow for some easier remote debugging down the line.   As for
why this uses fs_cli over the perl ESL its simply to make it as easy
as possible for users and not require compiling/installing the ESL
perl module and ensuring proper setup.  As long as you have fs_cli
then you can use fs_logger.pl.

Thanks!

~Mitch



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list