Reference Guide New Features Installation, Transformations, Release Notes

process

Sets and gets process properties

MiniContents:

Arguments
Description
Examples

Format:

TV::process action [ object-id ] [ other-args ]

Arguments:

action

The action to perform, as follows:

commands

Displays the subcommands that you can use. The CLI responds by displaying the four subcommands shown here. Do not use other arguments with this subcommand.

get

Gets the values of one or more process properties. The other-args argument can include one or more property names. The CLI returns these property values in a list whose order is the same as the property names you entered.

If you use the -all option as an object-id, the CLI returns a list containing one (sublist) element for each object.

properties

Displays the properties that the CLI can access. Do not use other arguments with this subcommand.

set

Sets the values of one or more properties. The other-args arguments contains pairs of property names and values.

object-id

An identifier for a process. For example, 1 represents process 1. If you use the -all option, the subcommand is carried out on all objects of this class in the current focus.

other-args

Arguments required by the get and set subcommands.

Description:

The TV::process command lets you examine and set process properties and states. These states and properties are:

clusterid

The ID of the cluster containing a process. This is a number uniquely identifying the TotalView server that owns the process. The ID for the cluster TotalView is running in is always 0 (zero).

duid

The internal unique ID associated with an object.

executable

The program's name.

heap_size

The amount of memory currently being used for data created at runtime. Stated in a different way, the heap is an area of memory that your program uses when it needs to dynamically allocate memory. For example, calls to malloc() allocate space on the heap while free() releases it.

held

A value (either 1 or 0) indicating if the process is held; 1 means that the process is held. (settable)

hostname

The name of the process's host system.

id

The process ID.

image_ids

A list of the IDs of all the images currently loaded into the process both statically and dynamically. The first element of the list is the current executable.

nodeid

The ID of the node upon which the process is running. The ID of each processor node is unique within a cluster.

stack_size

The amount of memory used by the currently executing block or routines and all the blocks routines that have invoked it. For example, if your main routines invokes function foo(), the stack contains two groups of information--these groups are called "frames." The first frame contains the information required for the execution of your main routine and the second, which is the current frame, contains the information needed by foo(). If foo() invokes bar(), the stack contains three frames. When foo() finishes executing, the stack only contains one frame.

stack_vm_size

The logical size of the stack is the difference between the current value of the stack pointer and address from which the stack originally grew. This value can be different from the size of the virtual memory mapping in which the stack resides. For example, the mapping can be larger than the logical size of the stack if the process previously had a deeper nest of procedure calls or made memory allocations on the stack, or it can be smaller if the stack pointer has advanced but the intermediate memory has not been touched.

The value here is this difference in size.

state

Current state of the process. See state_values for a list of states.

state_values

Lists all possible values for the state property. These values can be break, error, exited, running, stopped, or watch.

syspid

The system process ID.

text_size

The amount of memory used to store your program's machine code instructions. The "text segment" is sometimes called the "code segment."

threadcount

The number of threads in the process.

threads

A list of threads in the process.

vm_size

The sum of the sizes of the mappings in the process's address space.

Examples:

TV::process get 3 threads

Gets the list of threads for process 3. For example:

1.1 1.2 1.4

TV::process get 1 image_ids

Returns a list of image IDs in process 1. For example:

1|1 1|2 1|3 1|4

f g TV::process get -all id threads

For each process in the group, creates a list with the process ID followed by the list of threads. For example:

{1 {1.1 1.2 1.4}} {2 {2.3 2.5}} {3 {3.1 3.7 3.9}}

foreach i [TV::process get 1 image_ids] {
    puts [TV::image get $i name]}

Prints the name of the executable and all shared libraries currently linked into the focus process. For example, the output of this command might be:

arraysAIX
/usr/lib/libxlf90.a
/usr/lib/libcrypt.a
/usr/lib/libc.a

 
 
 
Select a section:
 
documentation@etnus.com
Copyright © 2003, Etnus, Inc. All rights reserved.
Version 6.2