# Used memory display problem

**URL:** <https://community.openpbs.org/t/used-memory-display-problem/3894>\
**Category:** Users/Site Administrators\
**Created:** [May 29, 2024, 9:24am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894 "2024-05-29T09:24:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 29, 2024, 9:24am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/1 "2024-05-29T09:24:44Z")

</div>

Node d003 is running two jobs, both of which occupy memory. But when I use the command(qstat -answ / pbsnodes d003) to view the properties, why is the memory allocation displayed incorrectly?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/69adeafb03f7e901136438ddc707db42ff4c8e82.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/934c927f27af674ba89ba0979cb38690524a8b2e.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/947ec9b8745099b6882d966ca217ca1b736881f9.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/16880ca13b574e4b0627ac885a436c57a2af2bc2.png)

---

<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:** [May 29, 2024, 10:59am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/2 "2024-05-29T10:59:29Z")

</div>

1. resources\_available. depends on the qsub request  
qsub -l select=1:ncpus=2:mem=2gb -l walltime=00:10:00 – /bin/sleep 100  
- Try the above submission and check pbsnodes output .  
- note this is not the report on the consumption of resources, it is allocation mapped by the scheduler.

2. in the pbsnodes -aSjv output , f denotes free and t denotes total

For example-1, my test:

```auto
[pbsdata@rhel9 ~]$ qsub -l select=1:ncpus=4:mem=2gb -- /bin/sleep 100
1001.rhel9
[pbsdata@rhel9 ~]$ pbsnodes -aSjv
                                                        mem ncpus nmics ngpus
vnode state njobs run susp f/t f/t f/t f/t jobs
--------------- --------------- ------ ----- ------ ------------ ------- ------- ------- -------
rhel9 job-busy 1 1 0 6gb/8gb 0/4 0/0 0/0 1001
[pbsdata@rhel9 ~]$ qstat -answ1

rhel9: 
                                                                                                   Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
------------------------------ --------------- --------------- --------------- -------- ---- ----- ------ ----- - -----
1001.rhel9 pbsdata workq STDIN 2828 1 4 2gb -- R 00:00:00 rhel9/0*4
   Job run at Wed May 29 at 11:54 on (rhel9:ncpus=4:mem=2097152kb)
[pbsdata@rhel9 ~]$ pbsnodes -av
rhel9
     Mom = rhel9
     ntype = PBS
     state = job-busy
     pcpus = 4
     jobs = 1001.rhel9/0, 1001.rhel9/1, 1001.rhel9/2, 1001.rhel9/3
     resources_available.arch = linux
     resources_available.host = rhel9
     resources_available.mem = 8106532kb
     resources_available.ncpus = 4
     resources_available.vnode = rhel9
     resources_assigned.accelerator_memory = 0kb
     resources_assigned.hbmem = 0kb
     resources_assigned.mem = 2097152kb
     resources_assigned.naccelerators = 0
     resources_assigned.ncpus = 4
     resources_assigned.vmem = 0kb
     resv_enable = True
     sharing = default_shared
     license = l
     last_state_change_time = Wed May 29 11:54:39 2024
     last_used_time = Wed May 29 11:54:36 2024

```

Example-2

```auto
[pbsdata@rhel9 ~]$ pbsnodes -av
rhel9
     Mom = rhel9
     ntype = PBS
     state = free
     pcpus = 4
     resources_available.arch = linux
     resources_available.host = rhel9
     resources_available.mem = 8106532kb
     resources_available.ncpus = 4
     resources_available.vnode = rhel9
     resources_assigned.accelerator_memory = 0kb
     resources_assigned.hbmem = 0kb
     resources_assigned.mem = 0kb
     resources_assigned.naccelerators = 0
     resources_assigned.ncpus = 0
     resources_assigned.vmem = 0kb
     resv_enable = True
     sharing = default_shared
     license = l
     last_state_change_time = Wed May 29 11:56:20 2024
     last_used_time = Wed May 29 11:56:20 2024

[pbsdata@rhel9 ~]$ qsub -- /bin/sleep 100
1002.rhel9
[pbsdata@rhel9 ~]$ pbsnodes -av
rhel9
     Mom = rhel9
     ntype = PBS
     state = free
     pcpus = 4
     jobs = 1002.rhel9/0
     resources_available.arch = linux
     resources_available.host = rhel9
     resources_available.mem = 8106532kb
     resources_available.ncpus = 4
     resources_available.vnode = rhel9
     resources_assigned.accelerator_memory = 0kb
     resources_assigned.hbmem = 0kb
     resources_assigned.mem = 0kb
     resources_assigned.naccelerators = 0
     resources_assigned.ncpus = 1
     resources_assigned.vmem = 0kb
     resv_enable = True
     sharing = default_shared
     license = l
     last_state_change_time = Wed May 29 11:56:20 2024
     last_used_time = Wed May 29 11:56:20 2024

[pbsdata@rhel9 ~]$ pbsnodes -aSjv
                                                        mem ncpus nmics ngpus
vnode state njobs run susp f/t f/t f/t f/t jobs
--------------- --------------- ------ ----- ------ ------------ ------- ------- ------- -------
rhel9 free 1 1 0 8gb/8gb 3/4 0/0 0/0 1002

```

Hope this helps

---

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 29, 2024, 11:57am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/3 "2024-05-29T11:57:39Z")

</div>

Unfortunately, the job remains the same and no memory usage data is shown. Is it because the job uses too little memory?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/5adf150bc2111d034c59f16ab934c97bd1de4a40.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/341a92fa6ea94ce907b08dd4c86e2a0b985b29d8.png)

---

<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:** [May 29, 2024, 11:06pm UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/4 "2024-05-29T23:06:00Z")

</div>

resources\_assigned.mem is not the memory used by the job. It is the memory that the user has requested via qsub. eg: qsub -l select=1:ncpus=4:mem=2gb , please check the examples above

Also, please share the qsub command used and qstat -fx output.

The memory used by job is reported against resources\_used.mem , you can find that in the qstat -fx output.

Reference: PBS Professional 2022.1 Administrator’s Guide, AG-94  
resources\_assigned:  
The total of each type of resource allocated to jobs running and exiting in this complex, plus the total of each type of resource allocated to any started reservations.

---

<div class="post-metadata">

**Author:** ![wakaka](https://avatars.discourse-cdn.com/v4/letter/w/d07c76/32.png) [@wakaka](https://community.openpbs.org/u/wakaka)\
**Post date:** [May 30, 2024, 1:28am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/5 "2024-05-30T01:28:15Z")

</div>

> [@adarsh](#):
>
> resources\_assigned.mem is not the memory used by the job. It is the memory that the user has requested via qsub. eg: qsub -l select=1:ncpus=4:mem=2gb , please check the examples above  
> resources\_signed.mem

Oh, I get it.  
This is the qsub command.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/7916d3724ac7ec481020a55f14c804193608d730.png)  
This is all the qstat -fx output.  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/b8ab30708b8c9baee3356cd65406449899d0d589.png)  
Is there a pbs command that allows me to directly see the memory usage of a node when running a job?  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pbspro/original/1X/d2b05c7ca177a366bf801de314f436150a8b0dce.png)

---

<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:** [May 30, 2024, 6:36am UTC](https://community.openpbs.org/t/used-memory-display-problem/3894/6 "2024-05-30T06:36:42Z")

</div>

Please try with the new syntax,

Replace the below line  
#PBS -l nodes=1:ppn=4

**with**

#PBS -l select=1:ncpus=4:mem=2gb

and submit the job with qsub.
