# Update job log live in particular dir

**URL:** <https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148>\
**Category:** Users/Site Administrators\
**Created:** [August 20, 2018, 9:06pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148 "2018-08-20T21:06:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ve0](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/ve0/32/123_2.png) [@Ve0](https://community.openpbs.org/u/Ve0)\
**Post date:** [August 20, 2018, 9:06pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/1 "2018-08-20T21:06:37Z")

</div>

Hello!

As I can understand, after you submit the job, PBS mom daemon create 2 files (output and error) and upload it into work dir after a job is finished.

So my question is: can I set up the PBS in that way when PBS mom daemon will create the file in the selected directory after job submitted and will update it on the spot?

---

<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:** [August 21, 2018, 7:35am UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/2 "2018-08-21T07:35:21Z")

</div>

Please refer the below section from [https://www.pbsworks.com/pdfs/PBSAdminGuide18.2.pdf](https://www.pbsworks.com/pdfs/PBSAdminGuide18.2.pdf)  
3.3.6 Writing Files Directly to Final Destination  
Also, man qsub has information.

---

<div class="post-metadata">

**Author:** ![Ve0](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/ve0/32/123_2.png) [@Ve0](https://community.openpbs.org/u/Ve0)\
**Post date:** [August 21, 2018, 5:14pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/3 "2018-08-21T17:14:08Z")

</div>

PBS ver 14.1.2  
I think you misunderstand me. Need to create the file in users directory ( **NOT IN MoM’s HOST DIR** ) immediately **after job START** and **write all information to file meanwhile job is running**.

And there is no 3.3.6 in Admin Guide))))

---

<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:** [August 21, 2018, 6:03pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/4 "2018-08-21T18:03:36Z")

</div>

> [@Ve0](#):
>
> PBS ver 14.1.2

This is avaialble in PBS Pro 18.x.x

Sorry, It is in the PBS Pro User guide

> **[High-performance Computing (HPC) and Cloud Solutions | Altair](https://altair.com/hpc-cloud-applications)**
>
> Altair’s industry leading HPC tools, solutions & applications let you orchestrate, visualize, optimize, and analyse your most demanding workloads, easily migrating to the cloud and eliminating I/O bottlenecks. Explore more.

Section: 3.3.6 Writing Files Directly to Final Destination

> [@Ve0](#):
>
> Need to create the file in users directory ( **NOT IN MoM’s HOST DIR** ) immediately **after job START** and **write all information to file meanwhile job is running**.

Yes, it will write in the final destination mentioned in the $PBS\_HOME/mom\_priv/config against the $usecp attribute.

---

<div class="post-metadata">

**Author:** ![Ve0](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/ve0/32/123_2.png) [@Ve0](https://community.openpbs.org/u/Ve0)\
**Post date:** [August 22, 2018, 5:37pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/5 "2018-08-22T17:37:53Z")

</div>

> [@adarsh](#):
>
> Yes, it will write in the final destination mentioned in the $PBS\_HOME/mom\_priv/config against the $usecp attribute.

Is it possible to select the path in qsub when you submit 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:** [August 23, 2018, 8:06am UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/6 "2018-08-23T08:06:47Z")

</div>

> [@Ve0](#):
>
> Is it possible to select the path in qsub when you submit the job?

No, we cannot specify the path in the qsub

Marking @nithinj

---

<div class="post-metadata">

**Author:** ![Ve0](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/ve0/32/123_2.png) [@Ve0](https://community.openpbs.org/u/Ve0)\
**Post date:** [August 23, 2018, 9:45pm UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/7 "2018-08-23T21:45:39Z")

</div>

Interesting. You told me it is impossible, but changelog of ver 18 sad:

> **New features include:**
> 
> - Write stdout/err files directly to their final destinations or automatically delete them, eliminating the overhead (and possible faults) associated with maintaining local copies  
> [Release PBS Pro v18.1 Beta Release · openpbs/openpbs · GitHub](https://github.com/PBSPro/pbspro/releases/tag/v18.1.beta)

Who is right?

---

<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:** [August 24, 2018, 8:17am UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/8 "2018-08-24T08:17:22Z")

</div>

Please check the PBS Pro 18.2 User Guide

 ![Capture](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/f5374411573be65ab4c345aac043f81c873fdf78.png)

We cannot specify a path in the **qsub** command line to write stderr/err files to their final destination.

You can use the below to write stderr/out  
qsub -o :/path/to/stdout -e :/path/to/stderr (but this will be copied only after job is finished ). which was not your requirement

> [@Ve0](#):
>
> As I can understand, after you submit the job, PBS mom daemon create 2 files (output and error) and upload it into work dir after a job is finished.

To directly write to a destination, you need to use the $usecp directive in the mom\_priv/config file, which means you are not allowed to use qsub -k :/path/to/stdout

---

<div class="post-metadata">

**Author:** ![nithinj](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/nithinj/32/45_2.png) [@nithinj](https://community.openpbs.org/u/nithinj)\
**Post date:** [August 27, 2018, 10:34am UTC](https://community.openpbs.org/t/update-job-log-live-in-particular-dir/1148/9 "2018-08-27T10:34:17Z")

</div>

You can chose the path using -o and -e option while submitting a job. But the output and error path should have been mapped using $usecp in mom config file unless the path is part of the mom.
