SYS.Stats.WriteDaemon
Class SYS.Stats.WriteDaemon Extends SYS.WSMon.wsResource [ System = 4 ]
This class provides detailed system metrics captured for the Write Daemon(s). Each instance of InterSystems IRIS has a Write Daemon, and on some operating systems may also have Auxiliary Write Daemons. Each instance of this class presents the data for one of these daemons, with the first instance being the main Write Daemon.
The current values for each class instance may be fetched using the Query 'Sample', and then the current value of each property can be accessed.
For example: s prop="Index,CurBlk,TotBlk,Cycles,CycleBlk,VolumeQ,Wake,CycleTime" ; list of properties s rset=##class(%ResultSet).%New("SYS.Stats.WriteDaemon:Sample") d rset.Execute() s len=$l(prop,",") ; list properties for all Write Daemons while rset.Next() { f i=1:1:len w rset.Data($p(prop,",",i)) w:i
Properties
Index
Property Index As %Integer;
An index number to uniquely identify this daemon.
CurBlk
Property CurBlk As %Integer;
The number of blocks written by current/latest cycle.
TotBlk
Property TotBlk As %Integer;
The cumulative number of blocks written by this daemon.
Cycles
Property Cycles As %Integer;
The number of active cycles for this daemon.
CycleBlk
Property CycleBlk As %Integer;
The average number of blocks written per WD cycle.
VolumeQ
Property VolumeQ As %String;
The list of databases served by this daemon
Wake
Property Wake As %Boolean;
A flag indicating if this daemon is currently active.
WakeStart
Property WakeStart As %String;
Time that the current write cycle started (returns "" if Wake = 0) This is returned in the same format at $ZTIMESTAMP (UTC date/time)
CycleTime
Property CycleTime As %Integer;
The time (in milliseconds) it took for the last complete write cycle.
CycleStart
Property CycleStart As %String;
The start time of the last complete write cycle. This is returned in the same format at $ZTIMESTAMP (UTC date/time)
Phase
Property Phase As %Integer;
Current phase of the Write Daemon.
This is an integer that represents the current phase of a processing cycle. The phases are:
0: Idle
1: Cycle initialization
2: Lock set, waiting for updaters
3: Forming block write list
4: Lock clear, waking updaters
5: Writing image journal
6: Image journal done, starting journal sync
7: Commiting WIJ and Journal
8: Database write phase
9: Commiting database writes to disk
10: Clearing WIJ
11: Cycle post processing
12: Cycle complete
Methods
SampleExecute
ClassMethod SampleExecute(ByRef qHandle As %Binary) As %Status
Sample counters for all Buffer sizes
SampleClose
ClassMethod SampleClose(ByRef qHandle As %Binary) As %Status [ PlaceAfter = SampleExecute ]
SampleFetch
ClassMethod SampleFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ PlaceAfter = SampleExecute ]
Sample
ClassMethod Sample(DaemonID As %Integer = 1) As SYS.Stats.WriteDaemon
Instantiate the class for an individual Write Daemon and fill in current values for all properties. 'DaemonID' is an integer from 1 to 'n' used to reference each daemon. A number greater than 'n' returns the property 'Index' as zero.
Allows for XML output of a single WriteDaemon instance.
Time
ClassMethod Time(time As %String) As %String [ Internal ]
Convert WD start times stored internally to $ZTIMESTAMP format.