# How to shutdown a server gracefully?

**URL:** <https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872>\
**Category:** Open Q&A\
**Tags:** oneagent, hosts-classic\
**Created:** [March 17, 2023, 3:10am UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872 "2023-03-17T03:10:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwangxi](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@kwangxi](https://community.dynatrace.com/u/kwangxi)\
**Post date:** [March 17, 2023, 3:10am UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872/1 "2023-03-17T03:10:53Z")

</div>

Hi，

Does anyone know the proper way (gracefully) of shutting down a server?

**Overview:**

- AIX server was shut down for maintenance purposes.
- one agent is not running after restarting the server, later it was due to endpoint corruption which has been claimed was due to the server being shut down ungracefully.

**Problems:**

- It was likely due to shutting down the server ungracefully. Hence I wanted to ask what’s the way of shutting down the server gracefully.
- As per documentation ([Host availability — Dynatrace Docs](https://www.dynatrace.com/support/help/platform-modules/infrastructure-monitoring/hosts/monitoring/host-monitoring/host-availability)), shutting down properly would return as **shutdown (in grey)** NOT **offline (in red).**
- I have tried a few methods to shut down the server, however, all returned as OFFLINE (in red) which implies an ungracefully shutdown.

**Below are the shutdown methods I have tried:**

-Shutdown via virtual manager  
-Command shutdown  
-Command sudo shutdown  
-Command poweroff  
-Command init0  
-Command shutdown -P +1

**Conclusion:**

1. I wish to understand the proper way of shutting down the server which will return as SHUTDOWN not OFFLINE.
2. And also how Dynatrace classifies graceful and ungrateful shutdowns although we are using the correct shutdown events as per above.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [March 20, 2023, 12:45pm UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872/2 "2023-03-20T12:45:05Z")

</div>

This is really good question. I too want to understand this. Appreciate is someone from Dynatrace product team can pick this up.

---

<div class="post-metadata">

**Author:** ![chris\_oggeri](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@chris\_oggeri](https://community.dynatrace.com/u/chris_oggeri)\
**Post date:** [March 20, 2023, 5:20pm UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872/3 "2023-03-20T17:20:47Z")

</div>

Hello&nbsp;[@kwangxi](https://community.dynatrace.com/user/58678),

Can you share details about the endpoints corruption?

We have similar issues since few months after the restart or some servers and the corruption of files like deployment.conf.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![danielD](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@danielD](https://community.dynatrace.com/u/danielD)\
**Post date:** [March 20, 2023, 6:43pm UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872/4 "2023-03-20T18:43:10Z")

</div>

Hello,

One thing you’d want to make sure you rule out is the part in the documentation shared about “alerting on graceful shutdown” and making sure that setting is turned off.

 ![danielD_0-1679337773164.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/7fa902e19607f0f2d1abd1f39e5916a8530dfbc6.png)

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [September 21, 2023, 8:06pm UTC](https://community.dynatrace.com/t/how-to-shutdown-a-server-gracefully/38872/5 "2023-09-21T20:06:11Z")

</div>

What I got from Doc on this:&nbsp;[Adjust the sensitivity of anomaly detection for infrastructure — Dynatrace Docs](https://www.dynatrace.com/support/help/platform/davis-ai/anomaly-detection/adjust-sensitivity-anomaly-detection/adjust-sensitivity-infastructure?_ga=2.253306825.1107766329.1695036709-98790739.1694459484&_gac=1.178506384.1694561546.EAIaIQobChMIppGxw52mgQMVcptaBR27zgWLEAAYASAAEgLBh_D_BwE&_gl=1*q4nbo6*_ga*OTg3OTA3MzkuMTY5NDQ1OTQ4NA).._\_ga\_1MEMV02JXV_MTY5NTMyMjM5NC40Ni4xLjE2OTUzMjY3MzcuMC4wLjA.

By default, Dynatrace alerts only about unexpected outages.

- During a graceful shutdown, the host outage is expected and the operating system has sent a shutdown signal notifying OneAgent that an operator is intentionally shutting down the host.
- If OneAgent receives no shutdown signal, the shutdown is classified as unexpected.

You can opt-in to receive notifications about graceful shutdowns as well.
