
Kevin
If you want to get replication information programmatically, you need to look at the following routine in the YDBGUI:
YDBGUI/routines/_ydbguiReplication.m
The first function getInstanceFile() parse the instance file information and populate an array in JDOM format (the MUMPS representation of a JSON file), so you can convert it to JSON straight away, passing it as a parameter to the JSON routines… (you can use the standard VistA VPRJSONxxx or copy them from the YDBWEBSERVER).
The second function getHealth() collects real-time information using the $$^%PEEKBYNAME() function. This will also return a JDOM array.
This is probably what you also want... At the moment I can not find where the description of all these fields is on the YDB docs, but they are there, somewhere...
Maybe Bhaskar or Sam can point you to the right doc page...
But looking at the code and the variable names, you should be able to find most of the stuff...
The other function is getBacklog() to get real-time backlog information (also using the PeekByName function...)
Finally (which probably is the best for you), just call the fullInfo() function and you will get a big array with all the info (and, yes, you can convert this to json right away as well...). It will also get all the log files and merge them, so you have a full overview...
Sorry I don’t remember all the details; it has been a while...
Hope this help...
Stef
PS: these functions quit a “pointer”, so you need to call them using the syntax:
set *myVal=$$fullInfo()
and get the array back.
PPSS: This code is calling a few external function like $$runShell^%ydbguiUtils, you will need to copy this code ait as well, but I don't think that there are many calls to external routines... You should be done in a short time...
--
You received this message because you are subscribed to the Google Groups "Everything MUMPS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to everythingmum...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/everythingmumps/7015d1f5-9ba5-41b7-be8f-59eb9d2df51fn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.