IRISLIB database
Monitor Class Reference

The <class>SYSTEM.Monitor</class> class provides an interface for accessing the System Monitor. More...

Inheritance diagram for Monitor:
Collaboration diagram for Monitor:

Static Public Member Functions

_.Library.Integer Alerts ()
 The <class>SYSTEM.Monitor</class> class provides an interface for accessing the System Monitor. More...
 
_.Library.Integer Clear ()
 Clears the alerts counter and sets the system state = 0 (OK).
 
_.Library.Integer ClearAlerts ()
 Clears the alerts counter.
 
_.Library.Status GetAlerts (_.Library.Integer Alerts, _.Library.String Messages, _.Library.String LastAlert)
 Read messages from the alerts.log file. More...
 
_.Library.Integer SetState (_.Library.Integer State)
 Set the system state. More...
 
_.Library.Integer State ()
 Returns the system state as an integer. More...
 
- Static Public Member Functions inherited from Help
_.Library.String Help (_.Library.String method)
 This is a helper class that is used by the various SYSTEM classes to provide a Help method. More...
 

Detailed Description

The <class>SYSTEM.Monitor</class> class provides an interface for accessing the System Monitor.

You can Get/Set/Clear the system 'State' and 'Alerts' counter.

You can use it via the special $SYSTEM object.

You can call help to get a list of all entrypoints:

Do $SYSTEM.Monitor.Help()

Member Function Documentation

◆ Alerts()

_.Library.Integer Alerts ( )
static

The <class>SYSTEM.Monitor</class> class provides an interface for accessing the System Monitor.

You can Get/Set/Clear the system 'State' and 'Alerts' counter.

You can use it via the special $SYSTEM object.

You can call help to get a list of all entrypoints:

Do $SYSTEM.Monitor.Help()

Returns the number of alerts posted to messages.log.

◆ GetAlerts()

_.Library.Status GetAlerts ( _.Library.Integer  Alerts,
_.Library.String  Messages,
_.Library.String  LastAlert 
)
static

Read messages from the alerts.log file.

Returns the number of messages in 'Alerts'

and an array of those messages in 'Messages'. 'LastAlert' contains the last message added to the alerts.log file.

This may be called periodically to get only recently added alerts. The first time GetAlerts is called, the caller should set LastAlert="". The caller may then retain the returned value and pass that LastAlert back in subsequent calls, to only retrieve messages added since then.

◆ SetState()

_.Library.Integer SetState ( _.Library.Integer  State)
static

Set the system state.

See State() for allowed integer values.

◆ State()

_.Library.Integer State ( )
static

Returns the system state as an integer.

-1: System is hung
0: System state is OK
1: System state is Warning
2: System state is Alert