Batch and Automated Debugging
You can set up unattended batch debugging sessions using TotalView’s powerful scripting tool tvscript. First, define a series of events that may occur within the target program. tvscript loads the program under its control, sets breakpoints as necessary, and runs the program. At each program stop, tvscript logs the data for your review when the job has completed.
A script file can contain CLI and Tcl commands (Tcl is the basis for TotalView’s CLI).
Here, for example, is how tvscript is invoked on a program:
 
tvscript \
-create_actionpoint "method1=>display_backtrace -show_arguments" \
-create_actionpoint "method2#37=>display_backtrace -show_locals -level 1" \
-display_specifiers "nowshow_pid,noshow_tid" \
-maxruntime "00:00:30" \
filterapp -a 20
You can also execute MPI programs using tvscript. Here is a small example:
 
tvscript -mpi "Open MP" -tasks 4 \
-create_actionpoint \
"hello.c#14=>display_backtrace" \
~/tests/MPI_hello
While batch debugging of large-scale MPI applications through tvscript has long been a powerful tool, tvscript has recently been enhanced and fully certified to handle 1024 process jobs, and 2048 threads per process, or more than two million running operations.
 
RELATED TOPICS 
 
About tvscript and batch scripting, including memory debugging
Batch Scripting and Using the CLI” in Debugging Memory Problems with MemoryScape
tvscript syntax and command line options
Batch Debugging Using tvscript” in the Classic TotalView Reference Guide