# How to ensure OneAgent starts before any applications?

**URL:** <https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153>\
**Category:** Open Q&A\
**Tags:** account-management, oneagent\
**Created:** [October 2, 2019, 11:09am UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153 "2019-10-02T11:09:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [October 2, 2019, 11:09am UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/1 "2019-10-02T11:09:16Z")

</div>

We had some Linux VM’s that were patched and noticed that some of the application started before the OneAgent. Is there any tricks anyone knows to ensure that the OneAgent is started before any applications on a server to ensure monitoring?

Thanks!

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 2, 2019, 1:34pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/2 "2019-10-02T13:34:44Z")

</div>

It’s not an issue. The oneagent daemon (the part that runs as separate processes) does not affect deep monitoring.

Deep monitoring is activated on the application startup by preloading the liboneagent.so library to every process. This activation is independent from the start of the Oneagent daemon. The only case I can think of would be that the agent was removed or switched to infrastructure mode when agents were restarted.

If some applications are not instrumented, try inspecting the logs and inspect the /etc/ld.so.preload.

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [October 2, 2019, 1:52pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/3 "2019-10-02T13:52:27Z")

</div>

True, but what we seen this last weekend after some server patching with a couple of Linux VM’s is that the applications actually got started before the OneAgent resulting in the applications needing to be restarted. First time I have seen this.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 2, 2019, 3:01pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/4 "2019-10-02T15:01:32Z")

</div>

Well definitely it is not because the oneagent process was started prior to the application processes. There must be another reason for this.

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [October 2, 2019, 3:09pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/5 "2019-10-02T15:09:07Z")

</div>

My thought is that it is somewhat like when you first install the OneAgent. It often requires specific things to be restarted so that Dynatrace can gain full visibility. It’s strange for sure… First time I have seen it.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 2, 2019, 6:42pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/6 "2019-10-02T18:42:21Z")

</div>

Understood… Anything interesting in the agent logs on the host?

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 2, 2019, 7:46pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/7 "2019-10-02T19:46:30Z")

</div>

Did you wait some time after host startup? Sometimes there is message about restart needed but it disappears after few minutes and monitoring is working fine. sebastian

---

<div class="post-metadata">

**Author:** ![abhirajsr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/abhirajsr/32/22474_2.png) [@abhirajsr](https://community.dynatrace.com/u/abhirajsr)\
**Post date:** [January 15, 2025, 6:42am UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/8 "2025-01-15T06:42:45Z")

</div>

We also got the same issue recently. After patching, our processes required a restart to enable monitoring. There was no agent update or change of monitoring mode.

---

<div class="post-metadata">

**Author:** ![Ramanan\_16](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ramanan\_16](https://community.dynatrace.com/u/Ramanan_16)\
**Post date:** [January 15, 2025, 2:22pm UTC](https://community.dynatrace.com/t/how-to-ensure-oneagent-starts-before-any-applications/22153/9 "2025-01-15T14:22:04Z")

</div>

We also faced same issue for few of our servers. But, couldn’t conform from when the issue started. I have no answer to the application teams, when i asked for process restart.
