[Rocks-Discuss] PBS old job location

48 views
Skip to first unread message

David Shrader

unread,
Mar 27, 2008, 3:09:45 PM3/27/08
to Rocks
Hello All,

Is there a way to find out where a completed job that was submitted
under PBS was invoked from? I can use qstat -f on running jobs, and it
does tell me the error and output paths, so I know that PBS knows this
information at the time of running a job.

I have found the tracejob command, but it only searches through the
server_logs directory for the job id. It seems that the logs in
server_logs do not keep this directory information. Is it kept anywhere
else? Is there a way I can get the directory information into the
server logs?

Thank you for your help!
David
--
David Shrader
Research Assistant
Computational Materials Group
Materials Science Program
University of Wisconsin - Madison
email: dshr...@wisc.edu
web: http://matmodel.engr.wisc.edu/

Roy Dragseth

unread,
Mar 28, 2008, 5:55:31 AM3/28/08
to npaci-rocks...@sdsc.edu
On Thursday 27 March 2008, David Shrader wrote:
> Hello All,
>
> Is there a way to find out where a completed job that was submitted
> under PBS was invoked from? I can use qstat -f on running jobs, and it
> does tell me the error and output paths, so I know that PBS knows this
> information at the time of running a job.
>
> I have found the tracejob command, but it only searches through the
> server_logs directory for the job id. It seems that the logs in
> server_logs do not keep this directory information. Is it kept anywhere
> else? Is there a way I can get the directory information into the
> server logs?
>
> Thank you for your help!
> David

You need to be root to get to the right logs. It is the accounting log
in /opt/torque/server_priv/accounting/ that contains this information. If you
do not want to open up read access to this path for the users you can make
tracejob setuid root.

r.

--

The Computer Center, University of Tromsø, N-9037 TROMSØ Norway.
phone:+47 77 64 41 07, fax:+47 77 64 41 00
Roy Dragseth, Team Leader, High Performance Computing
Direct call: +47 77 64 62 56. email: ro...@cc.uit.no

David Shrader

unread,
Mar 28, 2008, 11:13:39 AM3/28/08
to Roy Dragseth, npaci-rocks...@sdsc.edu
Thank you for the suggestion. However, the files in
/opt/torque/server_priv/accounting also don't keep track of where in the
directory structure the job was run from. It does have user names and
some of the other executing information (such as the executing host),
but it does not say where the job was submitted from. I am not able to
find any paths in any of the log files in /opt/torque (except for
/opt/torque/server_priv/jobs, which is where, I think, it keeps track of
running job information).

Does anyone know where PBS keeps track of the variable PBS_O_WORKDIR
after a job completes, if it does at all? The PBS documentation on
clusteresrouces.com does not have the answer. From what I do find
there, I think that PBS/torque doesn't keep that information, which is
very strange to me. SGE did.

Again, thank you for the help!
David

Roy Dragseth wrote the following on 03/28/2008 04:55 AM:
> On Thursday 27 March 2008, David Shrader wrote:
>> Hello All,
>>
>> Is there a way to find out where a completed job that was submitted
>> under PBS was invoked from? I can use qstat -f on running jobs, and it
>> does tell me the error and output paths, so I know that PBS knows this
>> information at the time of running a job.
>>
>> I have found the tracejob command, but it only searches through the
>> server_logs directory for the job id. It seems that the logs in
>> server_logs do not keep this directory information. Is it kept anywhere
>> else? Is there a way I can get the directory information into the
>> server logs?
>>
>> Thank you for your help!
>> David
>
> You need to be root to get to the right logs. It is the accounting log
> in /opt/torque/server_priv/accounting/ that contains this information. If you
> do not want to open up read access to this path for the users you can make
> tracejob setuid root.
>
> r.
>

--

Roy Dragseth

unread,
Mar 28, 2008, 4:46:31 PM3/28/08
to npaci-rocks...@sdsc.edu
Oh, I misundestood. I thought you meant which host the job was submitted from
and where it ran.

You are right, PBS does not keep this information after the job is finished.

You can of course save this yourself for running jobs in a relatively simple
shell script:

ls /opt/torque/server_priv/jobs/*.JB | xargs -i printjob {} | grep -e jobid -e
PBS_O_WORKDIR


r.

Bart Brashers

unread,
Mar 28, 2008, 1:56:28 PM3/28/08
to David Shrader, npaci-rocks...@sdsc.edu
As far as I know, PBS does not log $PBS_O_WORKDIR. As a work-around, I
wrote a qsub wrapper script (called "submit", email my off-list if you
would like a copy) that echo's that sort of info to a log file. You
might also be able to accomplish the same thing with a prologue script.
See
http://www.clusterresources.com/wiki/doku.php?id=torque:appendix:g_prolo
gue_and_epilogue_scripts.
A quick look does not list $PBS_O_WORKDIR as one of the available argv
values to that script, but it might be available via the environment
itself. It's pretty easy to test...

Bart

Reply all
Reply to author
Forward
0 new messages