Measure User's Guide
Creating a Custom Measurement Application
Measure User’s Guide—520560-003
6-7
Starting and Stopping the Measure Subsystem
entity to the configuration table, and set the type field to a negative value. You can
specify a negative value for the type string literal or the numeric identifier.
For example, to measure all CPUs except CPU 6:
1. Add a CPU specification in which type is set to CPU^T and cpu^number is set to
ALL.
2. Add a second CPU specification in which type is set to -CPU^T (the negative
literal that corresponds to CPU^T) and cpu^number is set to 6.
To do the same thing using numeric type identifiers instead of string literals:
1. Add a specification in which type is set to 1 (the numeric identifier for CPU) and
cpu^number is ALL (or the equivalent numeric literal, -1).
2. Add a second specification in which bit 0 of the type field is set to 1. This sets the
exclude flag and is equivalent to setting a negative value.
3. Set bits 1 through 15 of the type field to 1, the numeric type identifier for CPU.
4. Set the cpu^number field to 6.
Trailer Record
Use the template structure CONTAB^TRAILER to define the trailer record. The trailer
record consists of these elements:
•
Type—the numeric identifier 51, or the string literal CONTAB^TRAILER^T
(declared in the MEASDECS file). This field identifies this record as the trailer
record.
•
Len—the length of the trailer record, in bytes.
Use the template structure CONTAB^TRAILER to define the trailer record and to
assign the literal CONTAB^TRAILER^T to the type field.
Starting and Stopping the Measure Subsystem
Use the MEASMONCONTROL procedure to start and stop the Measure subsystem:
•
To start the subsystem, call the procedure with a nonzero start parameter.
To start the subsystem, a process must be a member of the super-user group.
•
To stop the subsystem, call the procedure with a zero-value start parameter.
Before you stop the subsystem, to determine if any measurements are active, call
the MEASMONSTATUS procedure.
Example 6-1 on page 6-8 uses MEASMONCONTROL to demonstrate all of these
actions.