This question already has an answer here:

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.

marked as duplicate by Gilles process Jun 26 '17 at 21:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  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

Not the answer you're looking for? Browse other questions tagged or ask your own question.