# API to trigger Memory dump

**URL:** <https://community.dynatrace.com/t/api-to-trigger-memory-dump/38552>\
**Category:** Open Q&A\
**Tags:** memory-dump\
**Created:** [February 23, 2023, 4:06am UTC](https://community.dynatrace.com/t/api-to-trigger-memory-dump/38552 "2023-02-23T04:06:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [February 23, 2023, 4:06am UTC](https://community.dynatrace.com/t/api-to-trigger-memory-dump/38552/1 "2023-02-23T04:06:48Z")

</div>

This was asked back in 2020 but now that we’re 2 to 3 years out I figured I’d ask again.

Also, with Dynatrace’s push for API first I thought it might be relevant to ask again.

We have a need to trigger this when a specific process reaches 86% of heap for 5 minutes.&nbsp; That way we can get a dump right before it freezes up.

(builtin:tech.jvm.memory.pool.used:filter(and(or(in(“dt.entity.process\_group\_instance”,entitySelector(“type(process\_group\_instance),entityId(~“PROCESS\_GROUP\_INSTANCE-84A1A852CED43316~”)”))))):splitBy():max) / (builtin:tech.jvm.memory.pool.max:filter(and(or(in(“dt.entity.process\_group\_instance”,entitySelector(“type(process\_group\_instance),entityId(~“PROCESS\_GROUP\_INSTANCE-84A1A852CED43316~”)”))))):splitBy():max)\*(100)

---

<div class="post-metadata">

**Author:** ![CTull](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@CTull](https://community.dynatrace.com/u/CTull)\
**Post date:** [February 24, 2023, 2:42pm UTC](https://community.dynatrace.com/t/api-to-trigger-memory-dump/38552/2 "2023-02-24T14:42:24Z")

</div>

We too are looking to automate these on our full stack webspehere applications as we routinely see memory leaks here and with mule.&nbsp; We are looking at ways to automate a mem dump using ansible tower and recycle the service.
