Skip to main content

SYS.Stats.Resource

Class SYS.Stats.Resource Extends SYS.WSMon.wsResource [ System = 4 ]

This class represents detailed system metrics captured for 'seizes' of system resources. Each instance of the class represents a different resource which controls access to a different part of the system code. Examples are 'Pid' for the internal process table, 'Lock' for locking structures, 'Stat' for statistics, etc.

The current values for each class instance may be fetched using the Query 'Sample', and then the current value of each property can be accessed.

For example: s sz="Name,Seize,Nseize,Aseize,Bseize,BusySet" ; list of properties s rset=##class(%ResultSet).%New("SYS.Stats.Resource:Sample") d rset.Execute() s len=$l(sz,",") ; list all resources and related seize counts while rset.Next() { f i=1:1:len w rset.Data($p(sz,",",i)) w:i Metrics for InterSystems IRIS instance resource contention

Properties

Name

Property Name As %String;

The name of the resource.

Seize

Property Seize As %Integer;

Number of Seizes

Nseize

Property Nseize As %Integer;

Number of Nseizes

Aseize

Property Aseize As %Integer;

Number of Aseizes

Bseize

Property Bseize As %Integer;

Number of Bseizes

BusySets

Property BusySets As %Integer;

Number of BusySet

Methods

SampleExecute

ClassMethod SampleExecute(ByRef qHandle As %Binary) As %Status

Sample counters for all Resource / SeizeTypes

SampleClose

ClassMethod SampleClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = SampleExecute ]

SampleFetch

ClassMethod SampleFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = SampleExecute ]

DisplayExecute

ClassMethod DisplayExecute(ByRef qHandle As %Binary) As %Status

Sample counters for all Resource / SeizeTypes. Same as "Sample" query except numbers are formatted with separator characters.

DisplayClose

ClassMethod DisplayClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = DisplayExecute ]

DisplayFetch

ClassMethod DisplayFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = DisplayExecute ]

DisplaySortExecute

ClassMethod DisplaySortExecute(ByRef qHandle As %Binary) As %Status

Sample counters for all Resource / SeizeTypes. Same as "Display" query except we've added "sort" columns, whih are the same number without formatting. The UI uses these extra columns to sort the display, as integers with "," separators get sorted as strings.

DisplaySortClose

ClassMethod DisplaySortClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = DisplaySortExecute ]

DisplaySortFetch

ClassMethod DisplaySortFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = DisplaySortExecute ]

Sample

ClassMethod Sample(Index As %Integer) As SYS.Stats.Resource

Instantiate the class for a specific resource and fill in current values for all properties. 'Index' is an integer from 1 to 'n' used to reference a specific resource. An index greater than 'n' returns a blank resource Name. To find a specific resource Name, you would loop through the Resource list starting at 1 until you find the Name (or reach a blank Name).

Allows for XML output of a single Resource instance.