<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
<spanid="batch-processing"></span><h1>Batch Processing<aclass="headerlink"href="#batch-processing"title="Permalink to this headline">¶</a></h1>
<p>With the help of <codeclass="docutils literal notranslate"><spanclass="pre">Batch</span><spanclass="pre">Processing</span></code>, you can run several commands in one line and get the results.</p>
<divclass="section"id="usage">
<spanid="usage"></span><h2>Usage<aclass="headerlink"href="#usage"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="step-1-create-the-script">
<spanid="step-1-create-the-script"></span><h3>Step-1: Create the script<aclass="headerlink"href="#step-1-create-the-script"title="Permalink to this headline">¶</a></h3>
<p>Creating a <codeclass="docutils literal notranslate"><spanclass="pre">test.as</span></code> script suffixed with <codeclass="docutils literal notranslate"><spanclass="pre">as</span></code> here for consistency (actually any suffix is acceptable).</p>
<li>each command takes each independent line;</li>
<li><codeclass="docutils literal notranslate"><spanclass="pre">dashboard</span></code> command should include <codeclass="docutils literal notranslate"><spanclass="pre">-b</span></code> to turn on batch mode and <codeclass="docutils literal notranslate"><spanclass="pre">-n</span></code> to ensure the script ends;</li>
<li>commands as <codeclass="docutils literal notranslate"><spanclass="pre">watch/tt/trace/monitor/stack</span></code> should include <codeclass="docutils literal notranslate"><spanclass="pre">-n</span></code> option to ensure the script ends;</li>
<li><aclass="reference internal"href="async.html"><spanclass="doc">asynchronous</span></a> can also be used as <codeclass="docutils literal notranslate"><spanclass="pre">watch</span><spanclass="pre">c.t.X</span><spanclass="pre">test</span><spanclass="pre">returnObj</span><spanclass="pre">></span><spanclass="pre">&</span></code>;</li>
<spanid="step-2-run-the-script"></span><h3>Step-2: Run the script<aclass="headerlink"href="#step-2-run-the-script"title="Permalink to this headline">¶</a></h3>
<p>Using <codeclass="docutils literal notranslate"><spanclass="pre">-b</span></code> to turn on script mode, and <codeclass="docutils literal notranslate"><spanclass="pre">-f</span></code> to run it and you can also <em>redirect</em> the output as:</p>
<spanid="step-3-check-the-outputs"></span><h3>Step-3: Check the outputs<aclass="headerlink"href="#step-3-check-the-outputs"title="Permalink to this headline">¶</a></h3>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.