Pbs script path from the id

Is it possible to lookup the path to the pbs script by Job ID? I cannot find the answer anywhere.

Well, what information do you have to go on? Is it just the output from ps? The tool to use is probably lsof if you have that available. Try:-

lsof -o -p process-id

You will get a long list of output. If you paste it into the thread then we can explain it to you.

Kind regards,
Robin

Different UNIX-like systems have different tools - Solaris: pfiles , many systems have either fuser or lsof or both.

So, if you told us what UNIX and shell you are running you would get much better answers. rbatte1's answer will work well on systems with lsof .

1 Like

My system is:

Linux helix 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

And when I do qstat -u user , it shows:

                                                                                  Req'd    Req'd       Elap
Job ID                  Username    Queue    Jobname          SessID  NDS   TSK   Memory   Time    S   Time
----------------------- ----------- -------- ---------------- ------ ----- ------ ------ --------- - ---------
2051312.master.j  user      batch    pipeline.pbs   8121     1      4    --   99:00:00 R  22:54:29