Skip to main content

%Monitor.System.LockTable

Class %Monitor.System.LockTable Extends %Monitor.System.Adaptor [ System = 4 ]

This class can sample the status of the Lock Table memory and generate an alert. To create an alert, set a maximum usage level (as a percentage) using the SetAlert() class method. Then use %MONAPPMGR to 'activate' this class in the %SYS namespace. When the Application Manager calls the GetSample() method to sample the used space, if it exceeds the maximum percentage, the method will generate an entry in the cconsole.log file (which may then be emailed via the System Monitor or used with SNMP). See the SetAlert() method for more details.

Parameters

APPLICATION

Parameter APPLICATION [ Internal ] = "CACHE";

Properties

TotalSpace

Property TotalSpace As %Monitor.Integer;

The total amount of space (in bytes) available for use by the Lock Table.

UsedSpace

Property UsedSpace As %Monitor.Integer;

The amount of space (in bytes) currently in use by the Lock Table.

Methods

Initialize

Method Initialize() As %Status

Initialize routine metrics.

GetSample

Method GetSample() As %Status

Get routine metric sample. Fetches current Lock Table space and will generate a message in the console log if the used percentage is higher than that input in SetAlert(). This is called automatically by the Application Monitor when this class is "activated".

A return code of $$$OK indicates there is a new sample instance.
A return code of 0 indicates there is no sample instance.

SetAlert

ClassMethod SetAlert(Maximum As %Integer) As %Integer

Stores a maximum percentage of used Lock Table space to be checked by the GetSample() method.

If the value of UsedSpace / TotalSpace * 100 falls below this value, then the GetSample method will log an error in the cconsole.log, which will trigger an alert by the System Monitor. Note that the %Monitor.System.LockTable Class must be "activated" in the Application Monitor (run ^%MONAPPMGR in the %SYS namespace).

A value of "0" will disable this alert.

Returns the previous value. If Maximum="", it returns the current value but does not change it.