0

I don't know how to properly describe my situation in the title. I am connected to an ubuntu server via PuTTy. I then ran a python script that is using my GPU. I can verify this by typing nvidia-smi which shows up

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3979      G   /usr/lib/xorg/Xorg                           161MiB |
|    0      4589      G   compiz                                       173MiB |
|    0     17024      C   python                                     10461MiB |
|    1     17024      C   python                                      3955MiB |
|    2     17024      C   python                                      3925MiB |
|    3     17024      C   python                                     10619MiB |
+-----------------------------------------------------------------------------+

I also had another command prompt printing the output of the python script that it was running. The problem is, I got disconnected from the internet and thus the server and the console windows all closed. I don't know if my python script is still being run because when I typed nvidia-smi I get the same output as shown above i.e. it is implying that I the script is still running.

My question is, how do I bring up the console window printing the output of this script ?

Kong
  • 1,151
  • 7
  • 32
  • 60
  • so what is the solution ? im new to this and dont understand the thread that was linked. I lost the process running the python script ? why does nvidia-smi still show 3 GPUs in use ? – Kong Jul 20 '18 at 08:36
  • 3
    What you can try *now* is the `reptyr` answer. The process is still running, but it's tricky to bring it to your new terminal. In the future, run your commands in `screen` (or `tmux`, or `byobu`) so that you can recover from SSH disconnection. – muru Jul 20 '18 at 08:40
  • Look at the linked duplicate and see if solutions there suit your question. If not, just explain why and either someone will find appropriate duplicate, or reopen your question. As for the script in question, it's probably still running, if it shows up in your command or `ps` output – Sergiy Kolodyazhnyy Jul 20 '18 at 08:44
  • @muru good to know that the process is indeed still running. and so the command will be screen python script.py .. tyvm ! – Kong Jul 20 '18 at 08:50

0 Answers0