TotalView User Guide : Part II: Debugging Tools and Tasks : Common Session Setup and Tools : Loading Programs : Loading Programs Using the GUI : Attaching to Processes
Attaching to Processes
If a program you’re testing is hung or looping (or misbehaving in some other way), you can attach to it while it is running. You can attach to single and multi-process programs, and these programs can be running remotely.
To attach to a process, select the Attach to an existing process item within the Program Page in the File > New Program command. A list of processes running on the selected host is displayed.
 
Figure 29: Attaching to an existing process
 
To attach to a program, simply click on the program’s name, then press OK.
 
CLI: dattach executable pid
*When you exit from TotalView, TotalView kills all programs and processes that it started. However, programs and processes that were executing before you brought them under TotalView’s control continue to execute.
While you must link programs that use fork() and execve() with the TotalView dbfork library so that TotalView can automatically attach to them when your program creates them, programs that you attach to need not be linked with this library.
*You cannot attach to processes running on another host if you are using TotalView Individual.
 
RELATED TOPICS 
Attached process states
Starting TotalView
Using the Root Window