2

I started an application from the terminal which prints the status and various logs in the console so that I can read them from the terminal. I accidentally closed the terminal but the application is still running, however, I can't see the logs anymore. Is there a way to get back access to that process console which is still running. ?

I am on Red Hat Enterprise Linux Server 7.1 (Maipo).

I was running an application in tornado, a python framework using the following command.

python2.7 /proj/website/app.py 8080

8080 is the port number.

1 Answers1

0
  1. Find the pid of the process python with ps, pgrep command.
  2. Get the file discriptor of 1 (stdout) or 2 (stderr) /proc/your_python_pid/fd/{1,2}.

I found the similar post and link: https://stackoverflow.com/questions/8994593/how-to-reroute-stdout-stderr-back-to-dev-tty

minish
  • 294