# How to collect the resources usage in job level?

**URL:** <https://discuss.ray.io/t/how-to-collect-the-resources-usage-in-job-level/11777>\
**Category:** Dashboard, Monitoring & Debugging\
**Created:** [August 14, 2023, 6:53am UTC](https://discuss.ray.io/t/how-to-collect-the-resources-usage-in-job-level/11777 "2023-08-14T06:53:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaolin](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@chaolin](https://discuss.ray.io/u/chaolin)\
**Post date:** [August 14, 2023, 6:53am UTC](https://discuss.ray.io/t/how-to-collect-the-resources-usage-in-job-level/11777/1 "2023-08-14T06:53:56Z")

</div>

hello,

When I use “ray job submit” to submit my job to a ray cluster, I ues prometheus to collect the default Metrics.

The cluster will collect the cpu and memory usage of nodes and component at the running time.

However, I can not select the cpu and memory usage of a specific tasks/job.  
Can you tell that if the ray support to collect those usage infomation at job running time?

In other word, I want to collect those usage infomation of a job, how can I achive this?

If not, can I calculate a **approximate cpu/memory usage infomation** from other collected metrics (eg, actor or component metrics)?

Thank you so much!

---

<div class="post-metadata">

**Author:** ![Huaiwei\_Sun](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/huaiwei_sun/32/1316_2.png) [@Huaiwei\_Sun](https://discuss.ray.io/u/Huaiwei_Sun)\
**Post date:** [August 14, 2023, 1:14pm UTC](https://discuss.ray.io/t/how-to-collect-the-resources-usage-in-job-level/11777/2 "2023-08-14T13:14:51Z")

</div>

> [@chaolin](#):
>
> However, I can not select the cpu and memory usage of a specific tasks/job.  
> Can you tell that if the ray support to collect those usage infomation at job running time?
> 
> In other word, I want to collect those usage infomation of a job, how can I achive this?

Currently, this is not supported.

> If not, can I calculate a **approximate cpu/memory usage infomation** from other collected metrics (eg, actor or component metrics)

I’m not sure. Will defer to @sangcho or @rickyyx on this.

One idea for achiving this:  
[create and collect application-level metrics](https://docs.ray.io/en/latest/ray-observability/user-guides/add-app-metrics.html#application-level-metrics)

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [August 21, 2023, 1:37pm UTC](https://discuss.ray.io/t/how-to-collect-the-resources-usage-in-job-level/11777/3 "2023-08-21T13:37:48Z")

</div>

> > If not, can I calculate a **approximate cpu/memory usage infomation** from other collected metrics (eg, actor or component metrics)

The best way is to see [Ray Dashboard — Ray 2.8.0](https://docs.ray.io/en/latest/ray-observability/getting-started.html#analyze-the-cpu-and-memory-usage-of-tasks-and-actors) and use `num_cpus` and `memory` field! There’s no native support now
