%SYS.System
Class %SYS.System Extends %SYSTEM.Help [ Abstract, System = 4 ]
The %SYS.System class provides an interface for managing utility functions.
You can call help to get a list of all entrypoints:
Do $system.Util.Help()
Methods
TempDirectory
ClassMethod TempDirectory() As %String
Returns the location of the Temp directory, where temporary files are kept.
GetSwitchState
ClassMethod GetSwitchState(switch As %Integer) As %Status [ Internal ]
State of a switch: 0 (clear) or 1 (set) or -1,Detail (error)
ToggleSwitch
ClassMethod ToggleSwitch(switch As %Integer, NewState As %Integer) As %Status
System Switches
Switches are used to inhibit certain kinds of processing while utilities such as Backups are being run.
Switches 8 & 9 may be of use for specialized customer applications:
Switch 8 - Inhibits responding to net requests
Switch 9 - Inhibits new network signons
The remaining switches are used to quiesce the system or provide a static environment for doing backups or examining the system
Switches 10, 12 and 13 are normally set the user is running backups
Switch 14 may be used to maintain application consistency or block contention
Switch 10 - Inhibits all global access except for the calling job
This switch is used with backups to coordinate with Transaction Processing. Use of this switch makes sure there are no transactions open when you clear the journal after you complete your backup. Switch 12 - Inhibit attempts to sign on Switch 13 - Inhibit sets, kills, and zsaves Switch 14 - Inhibit access to globals and routines
The following system functions for manipulating switches are provided:
Toggle a switch (from set to clear or clear to set) on local system
Set a switch on local system (error if switch is already set)
Clear a switch on local system (error if switch is already clear)
Toggle a switch (from set to clear or clear to set) on local system
SetSwitch
ClassMethod SetSwitch(switch As %Integer) As %Status
Set a switch on local system (error if switch is already set)
ClearSwitch
ClassMethod ClearSwitch(switch As %Integer) As %Status
Clear a switch on local system (error if switch is already clear)
InstanceGUID
ClassMethod InstanceGUID() As %String
Returns instance GUID.
An instance GUID is a 16 byte (128 bit) globally unique identifier, assigned per instance of InterSystems IRIS installation.
GetInstanceName
ClassMethod GetInstanceName() As %String
Returns instance name.
GetCPFFileName
ClassMethod GetCPFFileName() As %String
Returns the active CPF file name.
GetUniqueInstanceName
ClassMethod GetUniqueInstanceName(Flag As %Integer = 0) As %String
Returns NodeName:InstanceName.
This method returns the Node name of the system followed by a ":" followed by the Instance name. This name will be unique among InterSystems IRIS Instances in your network.
Parameters:
Flag = 0 (default) - Node name is the capitalized FQDN of the node, which will include the domain name.
For example:
HEARTOFGOLD.INTERNAL.COM:101U
Flag = 1 - Node name does not contain the domain name.
For example:
HEARTOFGOLD:101U
GetNodeName
ClassMethod GetNodeName(Flag As %Integer = 0) As %String
Returns the node name of the machine you are running on.
Parameters:
Flag = 0 (default) - Node name is the capitalized FQDN of the node, which will include the domain name.
For example:
HEARTOFGOLD.INTERNAL.COM
Flag = 1 - Node name of the machine as defined in the O/S.
For example:
HeartOfGold
GetGlobalCache
ClassMethod GetGlobalCache() As %Integer [ Internal ]
Returns the total amount of MBs used by global cache.
GetRoutineCache
ClassMethod GetRoutineCache() As %Integer [ Internal ]
Returns the total amount of MBs used as routine cache.
WriteToConsoleLog
ClassMethod WriteToConsoleLog(Message As %String, Flag As %Integer = 0, Severity As %Integer = 0, Event As %String = "Utility.Event") As %Status
Write a message to the messages.log file.
Flag = 1 - write it to the operator console as well
Severity - severity of condition
Severity = -2 (Debug2), -1 (Debug), 0 (Information), 1 (Warning), 2 (Severe), 3 (Fatal)
WriteToMVLog
ClassMethod WriteToMVLog(Message As %String, Severity As %Integer = 0) As %Status
Write a message to the mv.log file.
Severity = -2 (Debug2), -1 (Debug), 0 (Information), 1 (Warning), 2 (Severe), 3 (Fatal)
GetDefaultSignatureHash
ClassMethod GetDefaultSignatureHash(defaultSignatureHash As %String) As %Status
Get the DefaultSignatureHash property from Security.System