# Command to check how long a job has run and a summary of resources the job has used

**URL:** <https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478>\
**Category:** Users/Site Administrators\
**Created:** [February 9, 2021, 4:46am UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478 "2021-02-09T04:46:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hollow\_op](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@hollow\_op](https://community.openpbs.org/u/hollow_op)\
**Post date:** [February 9, 2021, 4:46am UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478/1 "2021-02-09T04:46:53Z")

</div>

Hi,  
I would like to know if there is a command to check how long a job has run and a summary of resources the job has used ?

Thanks in advance.

---

<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:** [February 9, 2021, 7:12am UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478/2 "2021-02-09T07:12:54Z")

</div>

Please use this command qstat -fx \< jobid \> to get the information you are interested in. For example 100 is the job id , then qstat -fx 100  
Note : Job history should be enabled for the PBS Complex  
QMGR: _set server job\_history\_enable = True_

---

<div class="post-metadata">

**Author:** ![hollow\_op](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@hollow\_op](https://community.openpbs.org/u/hollow_op)\
**Post date:** [February 9, 2021, 7:26am UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478/3 "2021-02-09T07:26:37Z")

</div>

thanks, I’ve run this command for a specific job and I got the following:

resources\_used.cpupercent = 196

How is it possible to use more than 100% of cpus ? Is this even allowed ?

What is the virtual memory ?

resources\_used.vmem = 67455328kb

Thanks a lot.

---

<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:** [February 9, 2021, 8:31am UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478/4 "2021-02-09T08:31:24Z")

</div>

Please share the qstat -fx \< jobid \> output of your job with cpupercent 196

> [@hollow\_op](#):
>
> What is the virtual memory ?  
> resources\_used.vmem = 67455328kb

Please follow this: [VMEM VS MEM - what is difference](https://community.openpbs.org/t/vmem-vs-mem-what-is-difference/1320)

---

<div class="post-metadata">

**Author:** ![smgoosen](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@smgoosen](https://community.openpbs.org/u/smgoosen)\
**Post date:** [February 9, 2021, 7:21pm UTC](https://community.openpbs.org/t/command-to-check-how-long-a-job-has-run-and-a-summary-of-resources-the-job-has-used/2478/5 "2021-02-09T19:21:24Z")

</div>

From the PBS Pro Admin Guide:

MoM calculates an integer value called cpupercent each polling cycle. This is a moving weighted average of CPU usage for the cycle, given as the average percentage usage of one CPU. For example, a value of 50 means that during a certain period, the job used 50 percent of one CPU. A value of 300 means that during the period, the job used an average of three CPUs.
