beautypg.com

Reading counter records – HP NonStop G-Series User Manual

Page 125

background image

Creating a Custom Measurement Application

Measure User’s Guide 520560-003

6- 13

Reading Counter Records

Reading Counter Records

To read counter records, use any of these procedures:

You must pass an entity descriptor to MEASREAD, MEASREAD_DIFF_, or
MEASREADACTIVE that specifies the entities whose records you want to read.
Because you can pass only one entity descriptor, you can read records belonging
to only one entity type in each call. If the measurement configuration includes more
than one entity type, you must issue a separate MEASREAD or
MEASREAD_DIFF_ call for each entity type whose records you want returned.

You can use wild-card values in the entity descriptor passed to the MEASREAD
and MEASREAD_DIFF_ procedures. For the entities included in the descriptor,
MEASREAD and MEASREAD_DIFF_ return the most recent records or the
records closest to the time you specify.

The entity descriptor passed to the MEASREADACTIVE procedure must describe
a single entity. Wild-card values in some fields, such as CPU, are not allowed.

In general, you receive one record for each entity in your entity descriptor. For
example, if your entity descriptor describes two entities, you receive two records,
provided that records for both entities exist. In the case of USERDEF and
PROCESSH entities, however, you can receive many records per entity.

Each USERDEF counter has its own counter record; the same is true of a
PROCESSH code range. Because you cannot pass counter descriptors or
code-range descriptors to MEASREAD, MEASREAD_DIFF_, or
MEASREADACTIVE, you cannot limit the records returned. MEASREAD and
MEASREAD_DIFF_ return all counter records associated with a PROCESSH or
USERDEF entity. MEASREADACTIVE returns all counter records associated with
a USERDEF entity. (MEASREADACTIVE cannot read PROCESSH records.) You
can select individual records from the returned records by checking the counter
name and index fields of USERDEF records and the code-space and code-range
fields of PROCESSH records.

Procedure

Returns...

MEASREAD

Counter records built from counter values in the data file

MEASREAD_DIFF_

Counter records built from counter values in the data file

MEASREADACTIVE

Counter records built from active counter values

Note.

The MEASREAD_DIFF_ procedure, an improvement on the MEASREAD procedure,

lets you specify a time window (both FROM and TO times) in the same procedure call. You can
use MEASREAD_DIFF_ with D00 or later PVUs of MEASFH. If you are using earlier PVUs of
MEASFH, you must use MEASREAD. For detailed descriptions of MEASREAD and
MEASREAD_DIFF_, see the Measure Reference Manual.