# How to open interactive shell to existing job

**URL:** <https://community.openpbs.org/t/how-to-open-interactive-shell-to-existing-job/1729>\
**Category:** Users/Site Administrators\
**Created:** [August 9, 2019, 7:01pm UTC](https://community.openpbs.org/t/how-to-open-interactive-shell-to-existing-job/1729 "2019-08-09T19:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ansonl](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@ansonl](https://community.openpbs.org/u/ansonl)\
**Post date:** [August 9, 2019, 7:01pm UTC](https://community.openpbs.org/t/how-to-open-interactive-shell-to-existing-job/1729/1 "2019-08-09T19:01:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [August 9, 2019, 7:51pm UTC](https://community.openpbs.org/t/how-to-open-interactive-shell-to-existing-job/1729/2 "2019-08-09T19:51:19Z")

</div>

> [@ansonl](#):
>
> Is there a way to find the compute node that an existing job is running on and open an interactive shell to it?

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

> [@ansonl](#):
>
> 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` .

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