process
Sets and gets process properties
Format:
TV::process action [ object-id ] [ other-args ]
Arguments:
action
The action to perform, as follows:
commands
Lists 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
Lists 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.
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.
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.
threadcount
The number of threads in the process.
threads
A list of threads in the process.
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