Wolfgang and Eugene:
I am testing it, but I am also dealing with the situation, when external process still run, but stay in cycle, or "frozen" .
In this situation read every x seconds last row from temporary "TIM" file and when actually time - last time from "TIM" file is more than for example 30 seconds, this is signal,
that external process not work.
Here is example temporary TIM file where external program write row every 1 second :
START na CPU : 2 - 20220810 14:59:47
AKTIV na CPU : 2 - 20220810 14:59:47
AKTIV na CPU : 2 - 20220810 14:59:48
AKTIV na CPU : 2 - 20220810 14:59:49
AKTIV na CPU : 2 - 20220810 14:59:50
AKTIV na CPU : 2 - 20220810 14:59:51
AKTIV na CPU : 2 - 20220810 14:59:52
AKTIV na CPU : 2 - 20220810 14:59:53
AKTIV na CPU : 2 - 20220810 14:59:54
AKTIV na CPU : 2 - 20220810 14:59:55
AKTIV na CPU : 2 - 20220810 14:59:56
AKTIV na CPU : 2 - 20220810 14:59:57
AKTIV na CPU : 2 - 20220810 14:59:58
STOP na CPU : 2 - 20220810 14:59:58
here is how read last time of activity and time difference
poziciaaktiv:=rat("AKTIV",cSourcestring)
aktivdattim:=substr(cSourcestring,poziciaaktiv,poziciastop-poziciaaktiv)
aktivdat:=substr(aktivdattim,at("-",aktivdattim)+2,8) // dátum
aktivtim:=substr(aktivdattim,at("-",aktivdattim)+2+8+1,8) // čas
rozdieltime:=timetosec(time())-timetosec(aktivtim) // rozdiel oproti aktuálnemu času
It will be interesting how it behaves on a server with heavy load and 12 core CPU