0

I have a server, and control it via ssh. I am using Windows PowerShell.

  1. So I first connect to the server and run my python script in background with

    python3 -m PKG &
    

    If I use jobs or ps, I can clearly see that it's running ok.

  2. Then if I exit this connection and start another one to the same server again, now, if I use ps or jobs I get nothing. Therefore I can kill my python process only if I remember its PID on the first session.

Is there any way to avoid this?

muru
  • 69,900
  • 13
  • 192
  • 292
ccvhd
  • 161
  • 4
  • Try this instead: `nohup python3 -m PKG &` – bitinerant Mar 10 '20 at 14:13
  • 1
    Related questions are https://unix.stackexchange.com/q/58134/5132 , https://unix.stackexchange.com/q/284129/5132 , https://unix.stackexchange.com/q/509147/5132 , and https://unix.stackexchange.com/q/508239/5132 . – JdeBP Mar 10 '20 at 15:51
  • @JdeBP 'ps aux' and 'top' are working just fine, thanks!) – ccvhd Mar 10 '20 at 19:41

0 Answers0