dattach

Brings currently executing processes under CLI control

Format:

dattach [ -g gid ] [ -r hname ]
    [ -ask_attach_parallel | -no_attach_parallel ]
    [ -e ] fname pid-list

Arguments:

-g gid

Sets the control group for the processes being added to be group gid. This group must already exist. (The CLI GROUPS variable contains a list of all groups. See GROUPS for more information.)

-r hname

The host on which the process is running. The CLI will launch a TotalView Debugger Server on the host machine if one is not already running there. Consult the TotalView User Guide for information on the launch command used to start this server.

Setting a host sets it for all PIDs attached to in this command. If you do not name a host machine, the CLI uses the local host.

-ask_attach_parallel

Asks if TotalView should attach to parallel processes of a parallel job. The default is to automatically attach to processes. For additional information, see File > Preferences in TotalView's Help.

-no_attach_parallel

Do not attach to any additional parallel processes within a parallel job. For additional information, see File > Preferences in TotalView's Help.

-e

Tells the CLI that the next argument is a file name. You need to use this argument if the file name begins with a dash (-) or only uses numeric characters.

fname

The name of the executable. Setting an executable here, sets it for all PIDs being attached to in this command. If you do not include this argument, the CLI tries to determine the executable file from the process. Some architectures do not allow this to occur.

pid-list

A list of system-level process identifiers (such as a UNIX PID) naming the processes that TotalView will control. All PIDs must reside on the same system and they will all be placed into the same control group.

If you need to place the processes in different groups or attach to processes on more than one system, you must use multiple dattach commands.

Description:

The dattach command tells TotalView to attach to one or more processes, making it possible to continue process execution under CLI control.

This command returns the TotalView process ID (DPID) as a string. If you specify more than one process in a command, dattach returns a list of DPIDs instead of a single value.

TotalView places all processes to which it attaches in one dattach command in the same control group. This allows you to place all processes in a multiprocess program executing on the same system in the same control group.

If a program has more than one executable, you must use a separate dattach for each.

If the fname executable is not already loaded, the CLI searches for it. The search will include all directories in the EXECUTABLE_PATH CLI state variable.

The process identifiers specified in the pid-list must refer to existing processes in the run-time environment. TotalView attaches to the processes, regardless of their execution states.

Command alias:

You may find the following alias useful:

Alias
Definition
Meaning
at
{dattach}
Brings the process under CLI control

Examples:

dattach mysys 10020

Loads debugging information for mysys and brings the process known to the run-time system by PID 10020 under CLI control.

dattach -e 123 10020

Loads file 123 and brings the process known to the run-time system by PID 10020 under CLI control.

dattach -g 4 -r Enterprise myfile 10020

Loads myfile that is executing on the host named Enterprise into group 4 and brings the process known to the run-time system by PID 10020 under CLI control. If a TotalView Debugger Server (tvdsvr) is not running on Enterprise, the CLI will start it.

dattach my_file 51172 52006

Loads debugging information for my_file and brings the processes corresponding to PIDs 51172 and 52006 under CLI control.

set new_pid [dattach -e mainprog 123]
dattach -r otherhost -g $CGROUP($new_pid) -e slaveprog 456

Begins by attaching to mainprog running on the local host. It then attaches to slaveprog running on otherhost and inserts them both in the same control group.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0