I have a computational program written in Python using Ray package with the following output:
Actor(Play001,69a6825d641b461327313d1c01000000)
This process uses the following pid:
pid = 87972
In the Ray dashboard I can view the logs. Snippets is as follows:
Logs
192.168.0.101 (PID: 87972)
1 Function 1: Starting up
2 Worker 1: Done
3 Press enter to continue or to exit
In Python I managed to check if this PID exists:
import psutil
pid = 87972
if psutil.pid_exists(pid):
print("a process with pid %d exists" % pid)
What I want is in real time to display the logs as well in my terminal output. How do I do this?