# Getting name of execution host?

**URL:** <https://community.openpbs.org/t/getting-name-of-execution-host/2290>\
**Category:** Users/Site Administrators\
**Created:** [September 24, 2020, 6:10am UTC](https://community.openpbs.org/t/getting-name-of-execution-host/2290 "2020-09-24T06:10:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![datakid](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@datakid](https://community.openpbs.org/u/datakid)\
**Post date:** [September 24, 2020, 6:10am UTC](https://community.openpbs.org/t/getting-name-of-execution-host/2290/1 "2020-09-24T06:10:34Z")

</div>

Is `$PBS_MOM_NODE_NAME` the way one would access the hostname(s) of the node(s) on which a job is running from inside the job?

---

<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:** [September 24, 2020, 7:45pm UTC](https://community.openpbs.org/t/getting-name-of-execution-host/2290/2 "2020-09-24T19:45:39Z")

</div>

It would be $PBS\_NODEFILE (this would be automatically generated by PBS Pro) , in this file the first node(hostname[s]) listed would be the mother superior in case of a MPI or multi-node jobs, rest of the nodes listed would be sister nodes.

simple test:  
qsub -l select=2:ncpus=2 -l place=scatter -I  
$ you get a console, at the console type echo $PBS\_NODEFILE;cat $PBS\_NODEFILE  
exit ; to exit the job

qsub -l select=2:ncpus=2:mpiprocs=2 -l place=scatter -I  
$ you get a console, at the console type echo $PBS\_NODEFILE;cat $PBS\_NODEFILE

Hope this helps

---

<div class="post-metadata">

**Author:** ![datakid](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@datakid](https://community.openpbs.org/u/datakid)\
**Post date:** [September 24, 2020, 10:37pm UTC](https://community.openpbs.org/t/getting-name-of-execution-host/2290/3 "2020-09-24T22:37:47Z")

</div>

Perfect - thank you. For those that come after me, there is information in section `10.13.4.2 Options for pbs_mpirun` of the big book - page 664 or AG-460.
