# PBS accounting for exclusive nodes

**URL:** <https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784>\
**Category:** Users/Site Administrators\
**Created:** [September 20, 2019, 2:49pm UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784 "2019-09-20T14:49:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![depaksoni](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@depaksoni](https://community.openpbs.org/u/depaksoni)\
**Post date:** [September 20, 2019, 2:49pm UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784/1 "2019-09-20T14:49:26Z")

</div>

Hi,  
i am using exclhost for every jobs , if jobs running on 1 or 2 cpus i am making node exclusive for jobs so rest of the cpus is idle

my question is can we make any setting in pbs server for node exclusive , means if i am using 1 or 2 ncpus in jobs but node is exclusive so i need to make accounting log should make entry for 32 cpus in use , it means full node use , i need to charge customer for full node not only 1 or 2 cpus 🙂

how to do it

regards  
deepak

---

<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:** [September 20, 2019, 2:57pm UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784/2 "2019-09-20T14:57:25Z")

</div>

Deepak,

In the excejob\_epilogue , find out whether the job placement is exclusive , if it is then you might update this

`j.resources_used["ncpus"] = 32`

Thank you

---

<div class="post-metadata">

**Author:** ![depaksoni](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@depaksoni](https://community.openpbs.org/u/depaksoni)\
**Post date:** [September 20, 2019, 3:05pm UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784/3 "2019-09-20T15:05:01Z")

</div>

Hi Adarsh,  
if user used to submit 2 ncpus jobs and pbs hook will given j.resources\_used[“ncpus”] = 32 so that user jobs will run only in 2 ncpus or it will run on 32 cpus

i only need to make entry in PBS accounting for 32 cpus but job should run on 2 cpus

regards  
deepak

---

<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:** [September 20, 2019, 8:23pm UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784/4 "2019-09-20T20:23:23Z")

</div>

Deepak,

The job will run on 2 ncpus only.  
execjob\_epilog hook runs after the job script has executed and hence only updates the ncpus=32, so your accounting logs has the entry 32 ncpus instead 2 ncpus

> [@depaksoni](#):
>
> i only need to make entry in PBS accounting for 32 cpus but job should run on 2 cpus

Thats correct, the hook will make sure that entry is made in the accounting logs.

Thank you

---

<div class="post-metadata">

**Author:** ![depaksoni](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@depaksoni](https://community.openpbs.org/u/depaksoni)\
**Post date:** [September 22, 2019, 4:37am UTC](https://community.openpbs.org/t/pbs-accounting-for-exclusive-nodes/1784/5 "2019-09-22T04:37:50Z")

</div>

Thanks Adarsh

it is working
