go to post Yaron Munz · Sep 5, 2022 The "write daemon" is a process that is responsible to write all new/changed data to the disk where the WIJ (write image journal) file is located. Only then, actual databases are being updated. Sometimes, when the system is very busy with a lot of pending writes this error appears, and then after few minutes it is cleared automatically. (e.g. when you rebuild a huge index, or do some data migration process). I would monitor the disk activity for the disk that the WIJ file is located on (by default its on the same disk you installed Cache). One solution is to move the WIJ to a different disk, less occupied. This will give the "write daemon" more writing capabilities (you will have to restart Cache).
go to post Yaron Munz · Aug 26, 2022 As you probably know the Intersystems IRIS is capable of doing calculations on a numbers in length of up to 19 positions. This is due to the fact that it is stored as a signed 64–bit integer. If you are using one of the latest version of IRIS which has an "embedded Python" then you will have the Python support for "bignum" or "long".So you may have a ClassMethod like this: ClassMethod BigNumbers1() [ Language = python ]{a = 9223372036854775807b = 9223372036854775808c = 9223372036854775807123456789print(a)print(b)print(c)print(c%2)} Which will give you the output: 9223372036854775807922337203685477580892233720368547758071234567891
go to post Yaron Munz · Aug 22, 2022 SAM is executing a REST API call to http://[your-server]/api/monitor/metrics for any server included in your cluster. I'm not sure where the interval is being configured. If your own metric is needed to be run once a day, you can schedule it with the 'task manager" have the result stored in a global, and let the "user defined" sensor read this global which will not caused any performance issue. BTW - one thing I forgot to mention in the previous post is:In order to have SAM run your "user defined" metrics, you need to add it to SAM: %SYS>Set sc = ##class(SYS.Monitor.SAM.Config).AddApplicationClass("MyClass", "namespace")
go to post Yaron Munz · Aug 22, 2022 First create a class: Class MyClass Extends %SYS.Monitor.SAM.Abstract Add a parameter that will indicate the prefi name for al your used defined metrics. Parameter PRODUCT = "Prefix"; Create a wrap method GetSensors() for all your user defined sensors (which can be ClassMethods): Method GetSensors() As %Status{Try { D ..SetSensor("sensor1", ..Sensor1()) D ..SetSensor("sensor2", ..Sensor2()) }Catch e { ;call your store error function g.e. ##class(anyClass).StoreError($classname(),e.DisplayString()) }}ClassMethod Sensor1() As %Integer{ ; do any calculation Quit Value}ClassMethod Sensor1() As %Integer{ ; do any calculation Quit Value}} Now you will get by the API REST call for the /api/mertics your "user defined" sensors at names:Prefix_sensor1 and Prefix_sensor2 Remarks:- Make sure that your GetSensors() and all your "used defined" sensors (classmethods) have a proper error handling so they are fail safe (you may use a try/catch or any other error trap like $ZT="something")- Make sue all your "user defined" sensors are preforming fast. This will enable the SAM metrics API REST call to get the data quickly without delays. In case some calculations are "heavy" it is better to have a separate process (task manager) to do those calculations, and store them in a global for fast data retrieval by the sensor
go to post Yaron Munz · Aug 19, 2022 When you install SAM, it is usually installed with a container. (we use docker, so I don't have experience with podman). We have this on a seperate machine (Linux) when our IRIS servers are Windows, but I don't see any limitation (except memory & CPU = performance) to run a container with SAM on the same IRIS machine. Grafana, and Promethus are part of the "bundle" (container) for SAM do you do not need to install them separately.
go to post Yaron Munz · Aug 17, 2022 Hello, I have done a similar thing in the past with Cache. As long as at the end of the process the IRIS will be at a new partition with the same letter, all the keys in registry that were created during the install, will still be valid.The risk with the procedure you mentioned is minimal, and all should work as expectged.
go to post Yaron Munz · Aug 15, 2022 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" } // }}
go to post Yaron Munz · Aug 11, 2022 To get any component status, you may use: SELECT Name, Enabled FROM Ens_Config.Item where Name['Yourname' To check queues you may use the following sql : select Name,PoolSize from ENS_Config.Item where Production='YourProductionName' Then, iterate on the result set and get the queue depth by: Set QueueCount=##class(Ens.Queue).GetCount(Name) To check latest activiy on a component, I would go to the: SELECT * FROM Ens.MessageHeader where TargetQueueName='yourComponentName' and then, to check the TimeProcessed
go to post Yaron Munz · Aug 9, 2022 There is an option to get a long time token (refresh token), if tokens are "cached" locally, you may have a scheduled task to refresh them.Another approach I would try here, is to use embedded python with this library:https://pypi.org/project/O365/#authentication
go to post Yaron Munz · Aug 9, 2022 On IRIS 2022.1 the class (%Net.POP3).Connect(...) has a 4th parameter: AccessToken I di not try, but maybe it will allow a connection with OAuth
go to post Yaron Munz · Aug 5, 2022 Cache 2018 support OAuth: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post Yaron Munz · Aug 5, 2022 You may do it programmatically: set mirrorName=$lg(##class(%SYSTEM.Mirror).GetMirrorNames(),1)zn "%SYS"Set result = ##class(%ResultSet).%New("SYS.Mirror:MemberStatusList") Set sc = result.Execute(mirrorName)while result.Next() { s status=result.GetData(9) // get all other info you need from GetData(nnn) }
go to post Yaron Munz · Aug 4, 2022 This is less accurate, Robert. on Leap years it will get "rounded" just a few days before birthday.A workaround this is to divide by 365.25 to get more accurate age
go to post Yaron Munz · Aug 4, 2022 No. I'm not using Laravel. My advice was general, not related to any experience with this product
go to post Yaron Munz · Aug 4, 2022 You have to distinguish between "journals" and "mirror-journals" files. the 1st are to ensure any instance DB integrity (DB corruption) in case of a failure. The 2nd are you ensure proper mirror "failover" and any A-Sync members. When LIVETC01 (as a Backup) is "catch up" its a good source to copy .DAT files to the LIVEDR.It is also safe to delete its mirror-journals.The steps you did to catch up the LIVEDR are correct. (I assume you did "activate" & "catch up" after that in LIVEDR) After the IRIS.DAT copy (of all DBs in mirror) from LIVETC01 to LIVEDR and both are "catch up" - It is safe to delete mirror-journals up to the point of the copy from your primary LIVETC02
go to post Yaron Munz · Aug 3, 2022 Hello, The IRIS management portal is a web application.It connects to the IRIS database with a component called: "CSP Gateway" (can be installed on various web servers: IIS, Apache, Nginx). This "CSP gateway" is enabling you to develop web applications that will interact with the DB directly though this component. You may run "ajax like" code on the server-side, and have all your web pages fully dynamic (generated on the server in run-time).TO work with the management portal from remote, you may take advantage of it's security mechanism (define users, roles, services) the ability to authenticate with external to IRIS entities (e.g. doing LDAP to ADDS) and also have a two-factor authentication, for better security. Any external data database or other tool that can do ODBC & JDBC can communicate with IRIS and get data out of it. Those are also.
go to post Yaron Munz · Aug 3, 2022 Hello, 1. If you mean to Concatenate in SQL than you can use the CONCAT function 2. To get the current date you may use the $ZDATE function (cos) pass the 1st parameter +$H and it will be todays date. 3. To find the DOB based on a date : Set Age = $P($ZD(+$h,3),"-")-$P($ZD(Dob,3),"-")-($E($ZD(+$H,8)5,8)<$E($ZD(Dob,8)5,8))
go to post Yaron Munz · Aug 3, 2022 Hello, I would try to contact the author of the GIT you mentioned, to find out which version of Cache he used and get some help.looks like he was updating the GIT at Apr 10, 2022, so this might indicate that he is active.I saw that he is using a Unix driver "libcacheodbcur6435.so" but I'm not sure which version is this.
go to post Yaron Munz · Jul 18, 2022 To get the "real" start date/time of a sessions, you will have to dig into the ^%cspSession(sessionID) global. you might see a date/time on $LG 20 & 21 (depending on your version)