Measure Reference Manual

MEASREADACTIVE
Reads data from a currently active counter. Before reading a counter, you must obtain a valid
measurement number (generally, by using MEASMONSTATUS (page 412)).
In D-series and Measure pre-G08 PVUs, MEASREADACTIVE cannot read DISCOPEN, DISKFILE,
or PROCESSH counters. In Measure G08 and later PVUs, the MEASREADACTIVE procedure cannot
read DISCOPEN or PROCESSH counters. To access these counter values, use the MEASREAD_DIFF_
procedure to read from the currently active measurement data file. The collection interval specified
for the measurement determines how recently the counter values were written to the data file.
error := MEASREADACTIVE ( meascb ! i,o
,measnum ! i
,entitydesc ! i
,loc ! o
,bufsize ! i
,bytesret ! o
,[ entity^index ] ! i,o
,[ templateversion ] ); ! i
error
INT
is the error code indicating the outcome of the operation. Possible error codes include:
DescriptionError Code
Successful completion.0
The counter records returned exceeded the buffer size.err^buftoosmall3204
The value of entity^index and the contents of entity^desc do not
match.
errm^cannotaccess3402
The value of entity^index and the contents of entity^desc do not
match.
errm^notmeasuring3404
meascb
input, output
INT:ref:$LEN(MEASCB^DEF) / 2
is a control block where the Measure subsystem stores data for subsequent procedure calls.
Before calling the first Measure procedure that uses meascb, you must allocate space in your
global data area for the control block and initialize each element of the control block to -1.
After you pass meascb to a Measure procedure, do not modify its contents.
The file $SYSTEM.SYSnn.MEASDECS contains the structure definition for the control block
descriptor (MEASCB^DEF).
measnum
input
INT:value
is the measurement number. Use the measnum value returned by the MEASCONFIGURE
procedure or find the measnum value using MEASMONSTATUS.
entitydesc
input
INT:ref:*
is the entity type and entity specification of the desired active counter record. Specify
entitydesc as one of the descriptors listed in the contab description of the
MEASCONFIGURE procedure. Because MEASREADACTIVE uses entitydesc to directly
access the entity control block (which in turn is used to access the counter record in system
MEASREADACTIVE 425