Pbs script path from the id


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Pbs script path from the id
# 1  
Old 09-14-2016
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.
# 2  
Old 09-15-2016
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:-
Code:
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
# 3  
Old 09-15-2016
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.
This User Gave Thanks to jim mcnamara For This Post:
# 4  
Old 09-15-2016
My system is:
Code:
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:

Code:
                                                                                  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


Last edited by rbatte1; 09-16-2016 at 04:16 AM.. Reason: Added ICODE tags for inline code
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

2. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

3. What is on Your Mind?

Pearls before swine could be abbreviated PBS

I have these mental shorthands, e.g., OPC for other people's code/children, so when a wise suggestion is ignored, I thought, pearls before swine, but the acronym PBS is already taken. Maybe it's an inside joke? (0 Replies)
Discussion started by: DGPickett
0 Replies

4. Shell Programming and Scripting

Problem with running awk script in pbs file

Hi guys I have a problem with one module of my script. It's awk script running in pbs file - It's working when I make a call from pbs to separate awk only file like this but when I try to execute this code in pbs file it fails awk 'BEGIN { max = -1000; min = 1000 } { {$4 == "TCO"} ... (2 Replies)
Discussion started by: grincz
2 Replies

5. High Performance Computing

PBS - restrict total number of processors per user

Hello everyone! I am a bit inexperienced with administering queueing programs. I installed Torque (a PBS derivative) on a Linux cluster and it is running well. There is one annoying problem though: users can run massively parallel jobs and serial jobs too. Almost all users do a mix of the two. I... (0 Replies)
Discussion started by: gnuplot
0 Replies

6. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using test.sh: echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies

7. Shell Programming and Scripting

Script Path Help

I have the following paths in a flat file /app00/app/mdbsorap/oradata/mfprd/system01.dbf /app00/app/mdbsorap/oradata/mfprd/system02.dbf /app00/app/mdbsorap/oradata/mfprd/system03.dbf /app00/app/mdbsorap/oradata/mfprd/system04.dbf /app00/app/mdbsorap/oradata/mfprd/system05.dbf what i would... (2 Replies)
Discussion started by: gseptember
2 Replies

8. Shell Programming and Scripting

Maintain full path of a script in a var when sourcing it from a different script

Hi All, I've searched through the forum for a solution to this problem, but I haven't found anything. I have 2 script files that are in different directories. My first script, let's call it "/one/two/a.sh" looks like this: #!/bin/sh IN_DIR=`dirname $0` CUR_DIR=`pwd` cd $IN_DIR... (4 Replies)
Discussion started by: mrbluegreen
4 Replies
Login or Register to Ask a Question