Label selectors, Selector operators – HP XC System 3.x Software User Manual
Page 62
Label Selectors
Using the hpcpictl label command in its simplest form is sufficient if you are executing and
monitoring a single process that is executed directly from a run string. To monitor groups of
processes or processes that are started indirectly, you can specify label selectors.
When you specify selectors, HPCPI associates data from all processes that match the selectors
with the label, independent of the process launched by the command in the run string. Using
selectors enables you to do the following:
•
Select data for the label from multiple processes or processes other than the process hpcpictl
starts.
•
Have hpcpictl execute a utility that controls the duration of the label.
For example, you can specify selectors and a command that has a fixed runtime, such as the
sleep
command. Another method is to specify selectors and a command that runs until
stopped by user action, such as the cat command with no input. The cat process uses the
standard input device (stdin) as the input, and continues to run until you close stdin or
explicitly terminate the cat process.
The hpcpictl label command syntax with selectors is as follows:
hpcpictl label label_name selectors command [arg...]
The selectors can be one or more of the following:
-pid process_id
Selects events for the specified process ID (PID).
-pid this
Selects events for the process launched for the specified
command
.
-ppid parent_process_id
Selects events for all processes with the specified parent PID.
-ppid this
Selects events for all processes with a parent PID that is the
PID of the process launched for the specified command.
-pgid process_group_id
Selects events for all processes with the specified process
group ID.
-pgid this
Selects events for all processes with the same process group
ID as the process group ID of the process launched for the
specified command.
-sid session_id
Selects events for all processes with the specified session ID.
-sid this
Selects events for all processes with the same session ID as
the session ID of the process launched for the specified
command
.
-uid user_id
Selects events for all processes with the specified user ID.
The uid selector is useful when using a utility such as
mpirun
that creates a new session and process group outside
the process tree of the processes it launches. For information
about using the uid selector in a cluster environment, see
“Starting a Distribution Utility from hpcpictl label”
(page 73)
.
-uid this
Selects events for all processes with the same user ID as the
user ID for the process launched for the specified command.
-cpu cpu_number
Selects all events for the specified CPU number.
Selector Operators
You can specify the following operators with selectors:
•
The unary postfix operator -not
•
The following binary postfix operators:
-and
62
Using HPCPI Labels