ZN "%sys" Set mirrorName=$system.Mirror.GetMirrorNames() Set result = ##class(%ResultSet).%New("SYS.Mirror:MemberStatusList") Set sc = result.Execute(mirrorName) while result.Next() { Set transfer=result.GetData(6) // you may filer the check for a specific machine on GetData(1) // Do any check on "transfer" to see if behind and calculate the threshold time e.g. // For i=1:1:$l(transfer," ") { // If $f($p(transfer," ",i),"hour") { W !,"hour(s) behind" } // Elseif $f($p(transfer," ",i),"minute"){ Set minutes=$p(transfer," ",i-1) W !,minutes_" minutes behind" } // } }
get the mirror name:
ZN "%sys"
Set mirrorName=$system.Mirror.GetMirrorNames()
Set result = ##class(%ResultSet).%New("SYS.Mirror:MemberStatusList")
Set sc = result.Execute(mirrorName)
while result.Next() {
Set transfer=result.GetData(6)
// you may filer the check for a specific machine on GetData(1)
// Do any check on "transfer" to see if behind and calculate the threshold time e.g.
// For i=1:1:$l(transfer," ") {
// If $f($p(transfer," ",i),"hour") { W !,"hour(s) behind" }
// Elseif $f($p(transfer," ",i),"minute") { Set minutes=$p(transfer," ",i-1) W !,minutes_" minutes behind" }
// }
}
Thank you. Looks like what I need.