Batch Scripting and Using the CLI
Batch Scripting Using tvscript
TotalView and MemoryScape can run unattended if you use the tvscript shell command. This is called batch debugging because like all batch programs, you do not need to use them interactively. In addition, you can invoke tvscript using cron to schedule debugging at off-hours, so reports will be ready when you want them.
The commands that tvscript executes can be entered in two ways. The first is to just use command-line options. The second—and recommended—is to creat a file containing commands that tvscript executes. A file can contain Tcl callback functions to be called when an event occurs within your program. These callback functions can also include CLI commands.
Here is an example of how tvscript is invoked using command-line options on an MPI program:
tvscript -mpi "Open MPI" -tasks 4 \
-create_actionpoint "hello.c#14=>show_backtrace" \
Some of the events that tvscript can act on are memory events. For example, if a double_free event occurs, you can create a Tcl callback function that tells you more about what the event. This callback function can include CLI commands.
"Batch Debugging Using tvscript" in the Classic TotalView Reference Guide explains how to use the tvscript command.