import{_ as n,o as c,c as o,a as e,b as i,w as d,d as t,e as s,r}from"./app.b2be689e.js";const l={},h=t(`

Batch Processing

With the help of Batch Processing, you can run multiple commands in batch and get the final result at the end.

Usage

Step 1: Create the script

Create a test.as script suffixed with as. Here as is suggested for the suffix of the filename, but in fact any suffix is acceptable.

\u279C  arthas git:(develop) cat /var/tmp/test.as
help
dashboard -n 1
session
thread
sc -d org.apache.commons.lang.StringUtils

Note:

`,7),u=t("
  • Each command takes one line.
  • Batch mode execution times (via -n) must be explicitly specified for dashboard, otherwise batch script cannot terminate.
  • Commands such as watch/tt/trace/monitor/stack should include -n option to ensure the script can be able to quit.
  • ",3),p=s("Also consider to use "),m=e("code",null,"async",-1),b=s(" (for example: "),v=e("code",null,"watch c.t.X test returnObj > &",-1),f=s(") to put commands run at background and get the output from the log file, see more from "),g=s("asynchronous job"),_=t(`

    Step 2: Run the script

    Use -f to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:

    ./as.sh -f /var/tmp/test.as 56328 > test.out
    

    Use -c also can specify the commands, like this:

    ./as.sh -c 'sysprop; thread' 56328 > test.out
    

    Step 3: Check the output

    cat test.out
    
    `,7);function k(x,y){const a=r("RouterLink");return c(),o("div",null,[h,e("ul",null,[u,e("li",null,[p,m,b,v,f,i(a,{to:"/en/doc/async.html"},{default:d(()=>[g]),_:1})])]),_])}var B=n(l,[["render",k],["__file","batch-support.html.vue"]]);export{B as default};