# Get process id from worker id

**URL:** <https://discourse.julialang.org/t/get-process-id-from-worker-id/122315>\
**Category:** General Usage\
**Tags:** parallel, distributed\
**Created:** [November 6, 2024, 2:51am UTC](https://discourse.julialang.org/t/get-process-id-from-worker-id/122315 "2024-11-06T02:51:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparrowhawk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sparrowhawk/32/9148_2.png) [@sparrowhawk](https://discourse.julialang.org/u/sparrowhawk)\
**Post date:** [November 6, 2024, 2:51am UTC](https://discourse.julialang.org/t/get-process-id-from-worker-id/122315/1 "2024-11-06T02:51:54Z")

</div>

Is there an easy way to get, from the worker id, the process id? I could do

```julia
# length(workers()) == 1039
[remotecall_fetch(getpid, w_id) for w_id in workers()] 

```

but is there a way to do this on worker 1 without fetching?

Thanks!
