Reading the measurement configuration – HP NonStop G-Series User Manual
Page 133

Creating a Custom Measurement Application
Measure User’s Guide — 520560-003
6- 21
Reading the Measurement Configuration
Reading the Measurement Configuration
You can get this information on the configuration and resource use of a measurement
by calling MEASREADCONF:
•
The measurement configuration table
•
The measurement start, stop, and interval time
•
The maximum number of entities of each type that were measured concurrently
during the life of the measurement (returned for inactive measurements only)
•
The maximum counter space used by each entity type during the life of the
measurement (returned for inactive measurements only)
MEASREADCONF reads the configuration table from the data file. Therefore, before
you call MEASREADCONF, you must call MEASOPEN to get read access to the data
file.
When you call MEASREADCONF, you must specify a buffer to receive the
configuration table. If the buffer you specify is too small for the entire configuration
table, MEASREADCONF returns error ERR^BUFTOOSMALL (code 3204), and no
information is returned. To avoid this error, you can allocate a buffer as large as 32000
bytes in an extended segment for the configuration table.
on page 6-22 restarts a measurement. It uses MEASREADCONF to get
the configuration table from the data file and then passes the table to
MEASCONFIGURE.
IF ERROR := MEASMONSTATUS(MEASCB,MEASUREMENTS,MEASNAMES)
THEN ... ! handle error
IF NOT MEASUREMENTS
THEN ... ! no active measurements; otherwise continue
MEASNUM := 0;
WHILE (MEASNUM < MAX^NUM^MEASUREMENTS) AND
(MEASNAMES[MEASNUM].FNAME[8] <> "CPU0DATA")
DO MEASNUM := MEASNUM + 1;
IF MEASNUM >= MAX^NUM^MEASUREMENTS
THEN ... ! Measurement not active; otherwise continue
! Pass measnum found above to MEASSTATUS and examine the
! returned entities array.
IF ERROR :=
MEASSTATUS(MEASCB,MEASNUM,CPUS,STARTTIME,STOPTIME,
INTERVAL, ENTITIES, CTRSPACE) THEN ... ! handle error
IF ENTITIES[PROCESS^T] > 0D
THEN ... ! PROCESS entities are being measured
Example 6-5. Using MEASMONSTATUS and MEASSTATUS (page 2 of 2)