%SYS
UserAbstract Class Reference

Abstract class used as the parent of all collection classes for user-defined metrics. More...

Static Public Member Functions

_.Library.Status Export (_.Library.String Property, _.Library.String FileName, _.Library.TimeStamp Start, _.Library.TimeStamp End, _.Library.String Function)
 Export user-defined data for time range in CSV format. More...
 
_.Library.Integer Purge (_.Library.Integer Keep)
 Purge user-defined interval data, keeping the last 'Keep' days. More...
 
_.Library.RegisteredObject Sample ()
 Instantiate the class and fetch current values for all metric properties.
 
_.Library.Status Summary (_.Library.Integer Day)
 Collect summaries of the user-defined metrics for a day into the Hourly/Daily database. More...
 

Public Attributes

 DateTime
 Time of sample. More...
 
 ZDATE
 UTC date key. More...
 
 ZTIME
 UTC time key. More...
 

Detailed Description

Abstract class used as the parent of all collection classes for user-defined metrics.

The SYS.History.User* classes are generated by inheriting from this class and then adding the user-defined classes as embedded objects. This includes User, UserPerf, UserSys, UserHourly and UserDaily.

See SYS.History.Adaptor for details about how to create user-defined metrics for SYS.History

Member Function Documentation

◆ Export()

_.Library.Status Export ( _.Library.String  Property,
_.Library.String  FileName,
_.Library.TimeStamp  Start,
_.Library.TimeStamp  End,
_.Library.String  Function 
)
static

Export user-defined data for time range in CSV format.

The default is all of the data

currently in the user-defined class, except those defined as ArrayOfObjects in the User class, or ARRAY=1 and ARRAYSUM=0 in the Hourly/Daily classes.

  • The 'Property' argument allows you to select a single user-defined class, including ones which are defined as ArrayOfObjects, by specifying the string used as the embedded property name.
  • The default FileName is HistoryUser_config_date_time.csv in the MGR directory.
  • 'Start' and 'End' times (if necessary) are in YYYY-MM-DD HH:MM:SS format.
  • '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. Only used for Hourly/Daily summary classes, otherwise ignored.

◆ Purge()

_.Library.Integer Purge ( _.Library.Integer  Keep)
static

Purge user-defined interval data, keeping the last 'Keep' days.

For Interval and Hourly

data this is typically called at the start of each day from the Monitor.System.History class using the current system default for 'Keep' (see the SetPurge() method in PerfData and Hourly). For Daily data it must be manually called.
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.

◆ Summary()

_.Library.Status Summary ( _.Library.Integer  Day)
static

Collect summaries of the user-defined metrics for a day into the Hourly/Daily database.

This is typically done automatically by the Monitor.System.History* classes at beginning of each day (for the previous day), but could be called manually if there's a problem. Not valid for UserDaily or UserHourly classes.

The 'Day' argument sets the end date of the collection, with the default of "0" being the start of today (i.e. $H+Day), which would collect everything for yesterday. A "-1" would collect the day before yesterday; a "1" would collect today (as much as there is).

Member Data Documentation

◆ DateTime

DateTime

Time of sample.

 

◆ ZDATE

ZDATE

UTC date key.

 

◆ ZTIME

ZTIME

UTC time key.