Skip to main content

SYS.History.SharedMemoryData

persistent class SYS.History.SharedMemoryData extends %Library.Persistent, %XML.Adaptor

SQL Table Name: SYS_History.SharedMemoryData

Basic detail collection class of System Usage metrics for the Shared Memory Application Monitor (%Monitor.System.HistoryMemory) Properties represent metrics which get collected every few minutes by the %MONAPP Application Monitor process when the %Monitor.System.HistoryMemory class is "active".

Property Inventory

Method Inventory

Properties

property Allocated as %Integer;
Shared Memory Allocated
Property methods: AllocatedDisplayToLogical(), AllocatedGet(), AllocatedGetStored(), AllocatedIsValid(), AllocatedLogicalToDisplay(), AllocatedNormalize(), AllocatedSet(), AllocatedXSDToLogical()
property Available as %Integer;
Shared Memory Available
Property methods: AvailableDisplayToLogical(), AvailableGet(), AvailableGetStored(), AvailableIsValid(), AvailableLogicalToDisplay(), AvailableNormalize(), AvailableSet(), AvailableXSDToLogical()
property GSTUsed as %Integer;
General String Table Used
Property methods: GSTUsedDisplayToLogical(), GSTUsedGet(), GSTUsedGetStored(), GSTUsedIsValid(), GSTUsedLogicalToDisplay(), GSTUsedNormalize(), GSTUsedSet(), GSTUsedXSDToLogical()
property Length as %Integer;
Length of sample in seconds
Property methods: LengthDisplayToLogical(), LengthGet(), LengthGetStored(), LengthIsValid(), LengthLogicalToDisplay(), LengthNormalize(), LengthSet(), LengthXSDToLogical()
property SMID as array of SYS.History.SharedMemoryUsage;
System usage metrics
Property methods: SMIDBuildValueArray(), SMIDCollectionToDisplay(), SMIDCollectionToOdbc(), SMIDDisplayToCollection(), SMIDGet(), SMIDGetObject(), SMIDGetObjectId(), SMIDGetStored(), SMIDGetSwizzled(), SMIDIsValid(), SMIDOdbcToCollection(), SMIDSet(), SMIDSetObject(), SMIDSetObjectId()
property SMTUsed as %Integer;
Static Memory Table Used
Property methods: SMTUsedDisplayToLogical(), SMTUsedGet(), SMTUsedGetStored(), SMTUsedIsValid(), SMTUsedLogicalToDisplay(), SMTUsedNormalize(), SMTUsedSet(), SMTUsedXSDToLogical()
property TotalGSTSMTAllocated as %Integer;
Total GST and SMT allocated
Property methods: TotalGSTSMTAllocatedDisplayToLogical(), TotalGSTSMTAllocatedGet(), TotalGSTSMTAllocatedGetStored(), TotalGSTSMTAllocatedIsValid(), TotalGSTSMTAllocatedLogicalToDisplay(), TotalGSTSMTAllocatedNormalize(), TotalGSTSMTAllocatedSet(), TotalGSTSMTAllocatedXSDToLogical()
property TotalUsed as %Integer;
Total Memory used
Property methods: TotalUsedDisplayToLogical(), TotalUsedGet(), TotalUsedGetStored(), TotalUsedIsValid(), TotalUsedLogicalToDisplay(), TotalUsedNormalize(), TotalUsedSet(), TotalUsedXSDToLogical()
property Used as %Integer;
Shared Memory Used
Property methods: UsedDisplayToLogical(), UsedGet(), UsedGetStored(), UsedIsValid(), UsedLogicalToDisplay(), UsedNormalize(), UsedSet(), UsedXSDToLogical()
property ZDATE as %Integer [ Required ];
UTC date key
Property methods: ZDATEDisplayToLogical(), ZDATEGet(), ZDATEGetStored(), ZDATEIsValid(), ZDATELogicalToDisplay(), ZDATENormalize(), ZDATESet(), ZDATEXSDToLogical()
property ZTIME as %Integer [ Required ];
UTC time key
Property methods: ZTIMEDisplayToLogical(), ZTIMEGet(), ZTIMEGetStored(), ZTIMEIsValid(), ZTIMELogicalToDisplay(), ZTIMENormalize(), ZTIMESet(), ZTIMEXSDToLogical()

Methods

classmethod Demo(Days As %Integer = 1, Interval As %Integer = 300) as %Integer

Create some data for demonstration purposes.

By default this method will create data for a single day assuming a sample interval of 300 seconds, hence it will generate (86400/300) samples.

The method works by finding the current usage of shared memory heap, and then for every sample will randomly increase or decrease the shared memory heap usage for a single consumer, with a bias towards gradually increasing the total SMH usage.

Warning: This will delete all existing data for SMH analysis

classmethod Purge(DaysKeep As %Integer = 0) as %Integer

Purge SharedMemoryData interval data, keeping the last 'DaysKeep' days.

This is typically called at the start of each day from the %Monitor.System.HistorySys class, using the current system default for 'Keep' (see the SetPurge() method). The 'DaysKeep' argument allows you to over ride the system default , a value of "0" or "" uses the system default, and a value of -1 deletes everything.

Returns the number of entries purged.

classmethod Report(Verbosity As %Integer = 0, StartZD As %Integer = 0, EndZD As %Integer = 0)

Generate a report that analyses the data that has been previously captured by the application monitor.

By default the report will include all samples from the table and will simply return a value that is the recommended size of SMH expressed in Kilobytes, which is calculated as the sum of the peak usage of all the shared memory heap consumers with a growth value added (2MB per CPU).

Verbosity The verbosity of the display to the screen, where 0 is the minimum verbosity (no output), 1 displays a summary and 2 displays a breakdown of the different consumers.

StartZD By default the report will include all samples found, but by passing a value here in internal date format, the report will only start from that date

EndZD By default the report will continue until the final sample at the last time and date is found. By passing a value here, which is a date in internal format, the report will stop its analysis at the end of this date.
classmethod SetPurge(Keep As %Integer = 0)

Set the system parameter for the number of days of sample data to keep.

Initial system default is 7 days. Return value is the previous setting, and executing this method with a "" argument will return the current setting without modifying it.

Queries

query UsageQuery()
Selects DateTime As %TimeStamp, ZDATE As %Integer, ZTIME As %Integer, Allocated As %Integer, Available As %Integer, Used As %Integer, SMTUsed As %Integer, GSTUsed As %Integer, TotalUsed As %Integer

Query the shared memory heap data and return a single data for each sample. The data returned is the total for this sample.

query UsageQuerySMID()
Selects DateTime As %TimeStamp, ZDATE As %Integer, ZTIME As %Integer, ConsumerName As %String, ConsumerID As %Integer, Allocated As %Integer, Available As %Integer, Used As %Integer, SMTUsed As %Integer, GSTUsed As %Integer, TotalUsed As %Integer

Query the shared memory heap data and return a data row for each consumer for each sample. Therefore the data returned reflects a single consumer of shared memory heap, and you will need multiple data rows returned for a full sample.

Indexes

index (ZDTindex on ZDATE,ZTIME) [IdKey, Type = key];
Database metrics
Index methods: ZDTindexCheck(), ZDTindexDelete(), ZDTindexExists(), ZDTindexOpen(), ZDTindexSQLCheckUnique(), ZDTindexSQLExists(), ZDTindexSQLFindPKeyByConstraint(), ZDTindexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (SYS.History.SharedMemoryData)

^SYS.History("Detail3")(ID,"SMID",n)
=
SMID(n)

Storage Model: Storage (SYS.History.SharedMemoryData)

^SYS.History("Detail3")(ID)
=
%%CLASSNAME
DateTime
Length
Allocated
Available
Used
SMTUsed
GSTUsed
TotalUsed
TotalGSTSMTAllocated
FeedbackOpens in a new tab