<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/2042/1/7/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information?focusedCommentId=13076654#comment-13076654">Collecting Debug Information</a></h2>
        <h4>Page
        <b>comment added</b> by              <a href="https://wiki.asterisk.org/wiki/display/~khratos">Jose P. Espinal</a>
    </h4>
    <br/>
    <div class="notificationGreySide">
       <div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Capturing Output Of CLI</b><br />Sometimes it's useful to capture the ouput of CLI on a text file (e.g. for debugging purposes), you could use this:
<br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
$ asterisk -r | tee asterisk-output.txt
...
]]></script>
</div></div>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[
server*CLI&gt; quit
]]></script>
</div></div></td></tr></table></div>
    </div>

        
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information?focusedCommentId=13076654#comment-13076654">View Online</a>
              |
       <a id="reply-13076654" href="https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information?replyToComment=13076654#comment-13076654">Reply To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>