# Pause or stop OneAgent if it consumes high resources

**URL:** <https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360>\
**Category:** Open Q&A\
**Tags:** oneagent, profiling-and-optimization\
**Created:** [May 4, 2021, 8:59pm UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360 "2021-05-04T20:59:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![awahab](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@awahab](https://community.dynatrace.com/u/awahab)\
**Post date:** [May 4, 2021, 8:59pm UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/1 "2021-05-04T20:59:35Z")

</div>

When CPU or Memory or IO used by OneAgent processes exceeds X threshold, we like to have the OneAgent watchdog stop the OneAgent processes or the OneAgent should suspend itself.

---

<div class="post-metadata">

**Author:** ![The\_AM](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@The\_AM](https://community.dynatrace.com/u/The_AM)\
**Post date:** [May 5, 2021, 6:23am UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/2 "2021-05-05T06:23:48Z")

</div>

Hi [@awahab](https://community.dynatrace.com/user/21653) ,

Dynatrace OneAgent already has **built-in mechanisms to reduce resource consumption.**

For example, the **network monitoring module** does along the lines of what you described, whereby it will throttle and pause monitoring in stages. **Link:** [**Network monitoring overhead**](https://www.dynatrace.com/support/help/how-to-use-dynatrace/networks/#expand-network-monitoring-overhead-2135)

I suggest reading up also on how **OneAgent uses** [**adaptive traffic management and control.**](https://www.dynatrace.com/support/help/shortlink/adaptive-capture-control)

If OneAgent simply paused or started and stopped, then we’d potentially lose data. Instead, with adaptive traffic management, we ensure data is statistically relevant to monitoring while maintaining a built-in limiter that helps to reduce resource consumption, like network bandwidth (especially for high volume scenarios).

Also for code modules, keep in mind that it is highly dependent on the monitored applications. See **[OneAgent code module memory requirements](https://www.dynatrace.com/support/help/shortlink/id_oneagent_code_module_memory_requirements)** for describing the **memory demand variance.**

See also [**File aging mechanism**](https://www.dynatrace.com/support/help/shortlink/oneagent-aging-mechanism) for how OneAgent manages **disk space** resources.

---

<div class="post-metadata">

**Author:** ![Marcelo\_santand](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marcelo_santand/32/13828_2.png) [@Marcelo\_santand](https://community.dynatrace.com/u/Marcelo_santand)\
**Post date:** [May 5, 2021, 1:52pm UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/3 "2021-05-05T13:52:25Z")

</div>

[@awahab](https://community.dynatrace.com/user/21653)&nbsp;  
answering your question would be entering windows control panel services and looking for the Dynatrace Oneagent service and click on stop. On linux, service oneagent stop

you can visit the following link:

> **[Stop/restart OneAgent on Linux](https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/installation-and-operation/linux/operation/stop-restart-oneagent-on-linux)**
>
> Learn how to stop and restart OneAgent on Linux.

Best Regards!

---

<div class="post-metadata">

**Author:** ![awahab](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@awahab](https://community.dynatrace.com/u/awahab)\
**Post date:** [August 25, 2021, 7:12pm UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/4 "2021-08-25T19:12:28Z")

</div>

This talks about only network and log files. We are specifically interested in CPU and RAM.

---

<div class="post-metadata">

**Author:** ![awahab](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@awahab](https://community.dynatrace.com/u/awahab)\
**Post date:** [August 25, 2021, 7:14pm UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/5 "2021-08-25T19:14:42Z")

</div>

We know how to stop it manually 🙂

The intention is to get dynatrace stop itself and send a notification when the issue happens without any manual intervention. We manage 30000+ servers. If this is already there , it will give peace of mind.

In a month we get 2-3 incidents like this.

---

<div class="post-metadata">

**Author:** ![gilgi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gilgi/32/11747_2.png) [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Post date:** [September 1, 2021, 6:47am UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/6 "2021-09-01T06:47:01Z")

</div>

[@awahab](https://community.dynatrace.com/user/21653)&nbsp;Bare in mind that code modules reside in the application process itself once it gets up and are not seperated. This is why measuring agent “overhead” by its own can only be done for the general purpose things.

If your IIS Application pool consumes 80% CPU because it is receiveing a lot of requests and working heavily against the DB, dynatrace will monitor all of it and will obviously consume CPU as well. How will you decide in this case that it is the cause for high cpu and not the application?

In any case, for these cases, disabling it dynamically really depends on the technology and whether you’ve enabled real time updates (if the technology permits). With .NET (for example) you’ll need to restart your processes because that’s how Microsoft is handling these changes.

---

<div class="post-metadata">

**Author:** ![The\_AM](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@The\_AM](https://community.dynatrace.com/u/The_AM)\
**Post date:** [September 2, 2021, 3:09am UTC](https://community.dynatrace.com/t/pause-or-stop-oneagent-if-it-consumes-high-resources/31360/7 "2021-09-02T03:09:17Z")

</div>

I shared more links than that just the network one. Some of it is a bit ‘reading between the lines’ and I apologise for that.

For your specific concerns, I suggest to reach out to Dynatrace ONE via in-product chat. They could help answer your queries.
