25.01.2015 Views

Caché Monitoring Guide - InterSystems Documentation

Caché Monitoring Guide - InterSystems Documentation

Caché Monitoring Guide - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Line-by-line Monitor Programming Interface<br />

Enter the number of your choice: 7<br />

The following routines have been executed during the run,<br />

and have detail statistics available for them.<br />

1) JRNDUMP<br />

2) JRNOPTS<br />

3) JRNSTART<br />

4) JRNSWTCH<br />

5) JRNUTIL<br />

6) JRNUTIL2<br />

Enter list of routines, or * for all<br />

Routine number (*=All) * - All<br />

FileName: monlbl_JRN_proc.txt<br />

Press RETURN to continue ...<br />

For each subroutine of the selected routine(s), the report displays a tag number, the counts for each metric, and the subroutine<br />

label (if source code is available).<br />

Routine ^JRNDUMP ...<br />

Tag RtnLine Time TotalTime<br />

1 6 0.000154 0.000154 JRNDUMP<br />

2 0 0 0 INT<br />

3 0 0 0 getkey1<br />

4 0 0 0 progress<br />

5 6 0.000050 0.000050 listhdr<br />

6 21 0.000240 0.000322 showlist<br />

7 20 0.136909 0.330301 listjrn<br />

8 7 0.188435 0.188435 getjrninfo<br />

9 0 0 0 guijrn<br />

.<br />

.<br />

.<br />

This is a portion of the report for one selected routine.<br />

7.4 Line-by-line Monitor Programming Interface<br />

Programmers can also interface with the <strong>Caché</strong> MONITOR facility through the %Monitor.System.LineByLine class. Methods<br />

are provided for each menu option in ^%SYS.MONLBL. For example, start monitoring by calling:<br />

Set status=##class(%Monitor.System.LineByLine).Start(Routine,Metric,Process)<br />

You can select which routines and processes to monitor. You may also select any of the other standard performance metrics<br />

supported by the %Monitor.System classes. Use the Monitor.System.LineByLine.GetMetrics() method to retrieve a list<br />

of metric names:<br />

Set metrics=##class(%Monitor.System.LineByLine).GetMetrics(3)<br />

Selecting 3 as the parameter prints a list of all available metrics with a short description for each to the current device.<br />

Stop monitoring by calling:<br />

Do ##class(%Monitor.System.LineByLine).Stop()<br />

You can retrieve the collected counts using the %Monitor.System.LineByLine:Result query, where the counters for each<br />

line are returned in $LIST format.<br />

See the %Monitor.System.LineByLine class entry in the online <strong>Caché</strong> Class Reference for more details.<br />

<strong>Caché</strong> <strong>Monitoring</strong> <strong>Guide</strong> 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!