Labsy Posted October 13, 2013 Posted October 13, 2013 Hi, Â when you shut down or reboot the server, you receive quite a lot of notifications about services going down. Is it possible to somehow detect that shutdown/reboot has been issued and suppress all notifications for monitored services until next start?
Marius Posted October 13, 2013 Posted October 13, 2013 Hi, Â How long does it take for your computer to shut down or restart?
Labsy Posted October 13, 2013 Author Posted October 13, 2013 As I have a plan to controll ALL servers I manage, there would be over 100 different answers  so, it depends...Windows servers are rebooted more often to apply patches, Linux server once a year. I noticed the above mentioned symptom on Windows server, but I cannot confirm it happens on all installations. The particular ones I observe took 7-10 minutes to shut down (Exchange servers)
Marius Posted October 13, 2013 Posted October 13, 2013 Thanks, that's helpful.  I assume the service stopped notification is set to fire when a service is stopped for 1 minute - I would change that to 10 in this case.
Labsy Posted October 13, 2013 Author Posted October 13, 2013 Excellent idea! I have service notification set to 3 minutes, but I'll change it to 10 and we.ll see. Thanx. Paul 1
Administrators Paul Posted October 13, 2013 Administrators Posted October 13, 2013 Usually Exchange servers shutdown like that because they are installed on the same machine with the Active Directory Controller. The symptom is that the ADDS services shutdown before exchange does and Exchange waits for a reply from a query he makes to AD. As far as I know the timeout is set to five minutes. Â I've reduced that timeout on my exchange server to 30 seconds and the machine shutsdown faster now.
Labsy Posted October 13, 2013 Author Posted October 13, 2013 Paul, that's very good tip! As you guessed, it's about SBS servers. On "normal" topology I never allow Exchange to be installed on DC, but on SBS I don't have much choice.  I've digged google a bit, but I cannot find where to change this timeout. Can you help?
Administrators Paul Posted October 14, 2013 Administrators Posted October 14, 2013 Right so you pretty much have two solutions over here: Â Reduce the time to kill amount to something acceptable (20 seconds maybe?). This value controls the amount of milliseconds it allows a service to shutdown before the system will actually kill it in order to proceed with shutdown. You will find that value here: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout Manually stop Exchange services before shutting down the machine. Create a batch script called shutdown_properly.bat and put it into a directory that's inside your PATH variable. In that batch script put something like this: @echo off echo 'Stopping Microsoft Exchange Services' net stop MSExchangeAB net stop MSExchangeADTopology net stop MSExchangeAntispamUpdate net stop MSExchangeEdgeSync net stop MSExchangeFBA net stop MSExchangeFDS net stop MSExchangeIS net stop MSExchangeMailboxAssistants net stop MSExchangeMailboxReplication net stop MSExchangeMailSubmission net stop MSExchangeProtectedServiceHost net stop MSExchangeRepl net stop MSExchangeRPC net stop MSExchangeSA net stop MSExchangeSearch net stop MSExchangeServiceHost net stop MSExchangeThrottling net stop MSExchangeTransport net stop MSExchangeTransportLogSearch shutdown -s -t 00 The last line on the batch script will call the system shutdown without forcing applications to close. In other words it will be a nice and clean shutdown just the way your server likes it. If you would like a reboot instead you can modify the last line to something like this: shutdown -r -t 00 Please note that the batch script will differ from Microsoft Exchange Server versions. The one I wrote to you works only with Microsoft Exchange Server 2010. If you are using a different version I recommend you to add the correct exchange services and remove the ones that are not installed on your system. Â Then if you would like to shutdown or restart you machine from your PC Monitor client open up terminal and write the batch file's name (Now you see why I made you place it into a directory inside the PATH variable, otherwise you would have to write the full path to the file too).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now