How to open interactive shell to existing job

Is there a way to find the compute node that an existing job is running on and open an interactive shell to it?
I looked at the output to qstat -f JOBID but didn’t see any mention of a compute node host.

I have a compute node running a job using a GPU and would like to login to that specific compute node and monitor CPU and GPU usage with top and nvidia-smi. Thanks.

You can find the node on which your job is running, by any of the below commands

  1. qstat -answ1 # for example : qstat -answ1 100.servername or qstat -answ1 100
  2. qstat -fx | grep -i exec_host
  3. qstat -fx | grep -i exec_vnode

You would get the exec_host or the compute node on which the job is running, then you can run
ssh computenode nvidia-smi

1 Like