# Memory monitoring

**URL:** <https://discuss.ray.io/t/memory-monitoring/21433>\
**Category:** Ray Client\
**Created:** [January 9, 2025, 4:37pm UTC](https://discuss.ray.io/t/memory-monitoring/21433 "2025-01-09T16:37:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thiago\_Canete](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/thiago_canete/32/7519_2.png) [@Thiago\_Canete](https://discuss.ray.io/u/Thiago_Canete)\
**Post date:** [January 9, 2025, 4:37pm UTC](https://discuss.ray.io/t/memory-monitoring/21433/1 "2025-01-09T16:37:08Z")

</div>

Is there a way to monitor ray memory consumption inside the actor?  
I want to check how much memory the node that is hosting my actor has and how much memory my actor is consuming and stop some tasks based on a threshold.  
I tried using ray.nodes() to gather the information but it doesn’t return memory usage.  
I’m considering using the dashboard API to get this info:

- http://ray\_api\_path/logical/actors/actor\_id
- http://ray\_api\_path/nodes/node\_id

Is there a better way to do it?
