Skip to main content

Line-by-line Monitor Programming Interface

Line-by-line Monitor Programming Interface

Programmers can also interface with the InterSystems IRIS MONITOR facility through the %Monitor.System.LineByLineOpens in a new tab class. Methods are provided for each menu option in ^%SYS.MONLBL. For example, start monitoring by calling:

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

You can select which routines and processes to monitor. You may also select any of the other standard performance metrics supported by the %Monitor.System classes. Use the Monitor.System.LineByLine.GetMetrics() method to retrieve a list of metric names:

Set metrics=##class(%Monitor.System.LineByLine).GetMetrics(3)

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

Stop monitoring by calling:

Do ##class(%Monitor.System.LineByLine).Stop()

You can retrieve the collected counts using the %Monitor.System.LineByLine:Result query, where the counters for each line are returned in $LIST format.

See %Monitor.System.LineByLineOpens in a new tab for more details.

FeedbackOpens in a new tab