Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / %SYS namespace / SYS.History.Hourly
Private  Storage   

SYS.History.Hourly


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

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.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
10 3 4 1


Summary


Properties
DB DateTime Perf PerfCount Sys
SysCount WD WDCount ZDATE ZTIME

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %BuildIndicesAsync
%BuildIndicesAsyncResponse %CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion
%ClassName %ComposeOid %ConstructClone %Delete
%DeleteExtent %DeleteId %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Exists %ExistsId %Extends
%GUID %GUIDSet %GetLock %GetParameter
%GetSwizzleObject %Id %InsertBatch %IsA
%IsModified %IsNull %KillExtent %KillExtentData
%LoadFromMemory %LockExtent %LockId %New
%NormalizeObject %ObjectIsNull %ObjectModified %Oid
%OnBeforeAddToSync %OnDetermineClass %Open %OpenId
%OriginalNamespace %PackageName %PhysicalAddress %PurgeIndices
%Reload %RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack
%Save %SaveDirect %SaveIndices %SerializeObject
%SetModified %SortBegin %SortEnd %SyncObjectIn
%SyncTransport %UnlockExtent %UnlockId %ValidateIndices
%ValidateObject Export Purge SetPurge
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


Properties


• property DB as array of SYS.History.Database;
Database metrics
• property DateTime as %TimeStamp;
Time of summary
• property Perf as array of SYS.History.Performance;
Performance metrics
• property PerfCount as %Integer;
Number of Performance samples in this Hourly period
• property Sys as array of SYS.History.SystemUsage;
System Usage metrics
• property SysCount as %Integer;
Number of SystemUsage samples in this Hourly period
• property WD as array of SYS.History.WriteDaemon;
WriteDaemon metrics
• property WDCount as %Integer;
Number of WriteDaemon cycles in this Hourly period
• property ZDATE as %Integer;
UTC date key
• property ZTIME as %Integer;
UTC time key

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.

Indices


•index (ZDTindex on ZDATE,ZTIME) [IdKey];