I have process1 running on one machine and generating some log file. Now I want to launch a another process which can be on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process one on terminal from which process2 is launched.
Process2 will be invoked as follows: process2 -dir "DirPath". In this DirPath process1 has written a file which has information like "pid of process1", "hostname of process 1" and "log file of process1". So process2 can access this file and has all the information about process1. Now process2 wants to know if process1 is currently running or not And if it is running then it needs to stream data written by process1 in logfile to the terminal from which process2 is launched.