beautypg.com

Not operator, And operator, Or operator – HP XC System 3.x Software User Manual

Page 63: Equiv operator, Operator syntax, Operator, Equiv

background image

-or

-equiv

-not

Operator

The unary postfix operator -not negates the specification. The following example uses the -not
operator to select events for nonsuperuser processes:

% hpcpictl label nonsuper -uid 0 -not sleep 30

This selects systemwide events for nonsuperuser processes (processes that do not have UID 0)
for 30 seconds (the runtime for the sleep 30 process) and associates them with the label
nonroot

.

-and

Operator

The binary postfix operator -and selects processes for which both selectors are true.

-or

Operator

The binary postfix operator -or selects processes if either selector is true.

-equiv

Operator

The binary postfix operator -equiv selects processes that have the same boolean value for the
selector.

You can follow the -equiv operator with a -not operator to perform an XOR operation
(selector_1 selector_2 -equiv -not).

NOTE:

HP would like to know if you use the -equiv and -equiv -not operators. If you do,

contact HP using the email address in the HPCPI and Xtools Release Notes.

Operator Syntax

Specify the operators and operands using Reverse Polish Notation (RPN), or postfix notation. A
binary postfix operator follows the two operands (selectors).

For example, the following command selects data for processes with PID 51 or 52 for 30 seconds
(the runtime for the sleep 30 process). HPCPI does not include data from the sleep process
with the label:

% hpcpictl label two -pid 51 -pid 52 -or sleep 30

To select data from three processes by adding data from the process with PID 53, enter the
following command:

% hpcpictl label three -pid 51 -pid 52 -pid 53 -or -or sleep 30

Operands and operators are stacked. For example, the user enters the following command:

% hpcpictl label comps -pgid this -pid this -not -and make all

The hpcpictl utility processes the selectors in the following order:

(-pgid this (-pid this -not) -and)

This causes hpcpictl to select data for all processes spawned by make (processes in the same
process group, as specified by -pgid this), but not data for the make process itself (-pid
this -not

).

Label Selectors

63