N
N
nnikolyaa2021-03-18 12:09:05
Python
nnikolyaa, 2021-03-18 12:09:05

How to view running python process on host's bash console?

I started the bot process on the hosting via ssh
I closed ssh, the process works
I reconnect to ssh to see the output of python
Connoisseurs, attention: question. How to see python output if it was opened in ssh and then minimized?

! Leave the method of outputting everything to a file :D

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2021-03-18
@saboteur_kiev

run
screen
python
then close the session
then connect and
screen -r
and spend 10 minutes reading man screen
In addition to screen, there is also tmux, but it must be installed separately.
Also , the correct way is via nohup
nohup python myscript &

S
Swartalf, 2021-03-18
@Swartalf

How do you launch?
you can run it in screen / tmux and you can always look at the output, although this is a so-so solution.
Still more reliable through systemd. There will be logs, and tracking the bot, and restarting if it suddenly falls

D
dooMoob, 2021-03-18
@dooMoob

1) no way
2) after closing the ssh connection, the process will stop

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question