Skip to main content

SYS.History.Hourly

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

SQL Table Name: SYS_History.Hourly

This class is an Hourly summary of the detail PerfData and SysData collections. For each class sample collected you may chose to have the Average, Maximum, Minimum, Median, Standard Deviation, and Total maintained for the day. By default Average, Maximum, and Standard Deviation are kept. Use the SetSummary method in each individual class (Performance, SystemUsage, etc.) to modify this. Performance counters (SYS.History.Performance) are normalized to a per-second rate for all the calculations.



By default, this data is automatically purged after 60 days.

Property Inventory

Method Inventory

Properties

property DB as array of SYS.History.Database;
Database metrics
Property methods: DBBuildValueArray(), DBCollectionToDisplay(), DBCollectionToOdbc(), DBDisplayToCollection(), DBGet(), DBGetObject(), DBGetObjectId(), DBGetStored(), DBGetSwizzled(), DBIsValid(), DBOdbcToCollection(), DBSet(), DBSetObject(), DBSetObjectId()
property DateTime as %TimeStamp;
Time of summary
Property methods: DateTimeDisplayToLogical(), DateTimeGet(), DateTimeGetStored(), DateTimeIsValid(), DateTimeLogicalToDisplay(), DateTimeLogicalToXSD(), DateTimeNormalize(), DateTimeOdbcToLogical(), DateTimeSet(), DateTimeXSDToLogical()
property Perf as array of SYS.History.Performance;
Performance metrics
Property methods: PerfBuildValueArray(), PerfCollectionToDisplay(), PerfCollectionToOdbc(), PerfDisplayToCollection(), PerfGet(), PerfGetObject(), PerfGetObjectId(), PerfGetStored(), PerfGetSwizzled(), PerfIsValid(), PerfOdbcToCollection(), PerfSet(), PerfSetObject(), PerfSetObjectId()
property PerfCount as %Integer;
Number of Performance samples in this Hourly period
Property methods: PerfCountDisplayToLogical(), PerfCountGet(), PerfCountGetStored(), PerfCountIsValid(), PerfCountLogicalToDisplay(), PerfCountNormalize(), PerfCountSet(), PerfCountXSDToLogical()
property Sys as array of SYS.History.SystemUsage;
System Usage metrics
Property methods: SysBuildValueArray(), SysCollectionToDisplay(), SysCollectionToOdbc(), SysDisplayToCollection(), SysGet(), SysGetObject(), SysGetObjectId(), SysGetStored(), SysGetSwizzled(), SysIsValid(), SysOdbcToCollection(), SysSet(), SysSetObject(), SysSetObjectId()
property SysCount as %Integer;
Number of SystemUsage samples in this Hourly period
Property methods: SysCountDisplayToLogical(), SysCountGet(), SysCountGetStored(), SysCountIsValid(), SysCountLogicalToDisplay(), SysCountNormalize(), SysCountSet(), SysCountXSDToLogical()
property WD as array of SYS.History.WriteDaemon;
WriteDaemon metrics
Property methods: WDBuildValueArray(), WDCollectionToDisplay(), WDCollectionToOdbc(), WDDisplayToCollection(), WDGet(), WDGetObject(), WDGetObjectId(), WDGetStored(), WDGetSwizzled(), WDIsValid(), WDOdbcToCollection(), WDSet(), WDSetObject(), WDSetObjectId()
property WDCount as %Integer;
Number of WriteDaemon cycles in this Hourly period
Property methods: WDCountDisplayToLogical(), WDCountGet(), WDCountGetStored(), WDCountIsValid(), WDCountLogicalToDisplay(), WDCountNormalize(), WDCountSet(), WDCountXSDToLogical()
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 Export(FileName As %String, Start As %TimeStamp, End As %TimeStamp, Class As %String, Function As %String, Database As %String) as %Status
Export Hourly data for a time range in CSV format. The default is all of the Perf, Sys and WD data currently in the Hourly class.

The default FileName is HistoryHour_config_date_time.csv in the MGR directory.
'Start' and 'End' times (if necessary) are in YYYY-MM-DD HH:MM:SS format.
'Class' can be a comma-delimited list one or more of these classes of metrics: "Perf", "Sys", "WD". Or it can be "DB" to select the Database properties. The Database class can not be mixed with the other classes since it uses a different key structure to accommodate multiple databaes.
'Function' can be a comma-delimited list one or more of these summary functions: "Avg", "Max", "Min", StDev", Med" or "Tot". The default is to include all summary functions.
'Database' can be used to select a specific database (by name). Only used if "DB" is selected in 'Class'
classmethod Purge(Keep As %Integer = 0) as %Integer
Purge Hourly total data, keeping the last 'Keep' days. This is typically called at the start of each day from the %Monitor.System.History* classes, using the current system default for 'Keep' (see the SetPurge() method). The 'Keep' argument allows you to over ride the system default (a value of "0" or "" uses the system default)

Returns the number of entries purged.
classmethod SetPurge(Keep As %Integer = "") as %Integer
Set the system parameter for the number of days of hourly data to keep. Initial system default is 60 days. Return value is the previous setting, and executing this method with a "" argument will return the current setting without modifying it.

Queries

query DBDateList(Start As %TimeStamp = $zdt($h-1, 3), End As %TimeStamp = $zdt($h, 3))
SQL Query:
SELECT DateTime,Hourly_DB.* FROM Hourly,Hourly_DB WHERE ((Hourly.ID = Hourly_DB.Hourly) AND (DateTime >= :Start) AND (DateTime <= :End))
Full listing of Hourly Database metrics for a day or range of date/times. Default is yesterday.
query PerfDateList(Start As %TimeStamp = $zdt($h-1, 3), End As %TimeStamp = $zdt($h, 3))
SQL Query:
SELECT DateTime,Hourly_Perf.* FROM Hourly,Hourly_Perf WHERE ((Hourly.ID = Hourly_Perf.Hourly) AND (DateTime >= :Start) AND (DateTime <= :End))
Full listing of Hourly Performance metrics for a day or range of date/times. Default is yesterday.
query SysDateList(Start As %TimeStamp = $zdt($h-1, 3), End As %TimeStamp = $zdt($h, 3))
SQL Query:
SELECT DateTime,Hourly_Sys.* FROM Hourly,Hourly_Sys WHERE ((Hourly.ID = Hourly_Sys.Hourly) AND (DateTime >= :Start) AND (DateTime <= :End))
Full listing of Hourly SystemUsage metrics for a day or range of date/times. Default is yesterday.
query WDDateList(Start As %TimeStamp = $zdt($h-1, 3), End As %TimeStamp = $zdt($h, 3))
SQL Query:
SELECT DateTime,Hourly_WD.* FROM Hourly,Hourly_WD WHERE ((Hourly.ID = Hourly_WD.Hourly) AND (DateTime >= :Start) AND (DateTime <= :End))
Full listing of Hourly WriteDaemon metrics for a day or range of date/times. Default is yesterday.

Indexes

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

Inherited Members

Inherited Methods

Storage

Storage Model: CacheStorage (SYS.History.Hourly)

^SYS.History("Hourly")(ID,"DB",n)
=
DB(n)

Storage Model: CacheStorage (SYS.History.Hourly)

^SYS.History("Hourly")(ID)
=
%%CLASSNAME
DateTime
PerfCount
SysCount
WDCount

Storage Model: CacheStorage (SYS.History.Hourly)

^SYS.History("Hourly")(ID,"Perf",n)
=
Perf(n)

Storage Model: CacheStorage (SYS.History.Hourly)

^SYS.History("Hourly")(ID,"Sys",n)
=
Sys(n)

Storage Model: CacheStorage (SYS.History.Hourly)

^SYS.History("Hourly")(ID,"WD",n)
=
WD(n)
FeedbackOpens in a new tab