Unity Scheduled Restart
The Unity Scheduled Restart is a simple tool that allows administrators to schedule a time for Unity to shut down nicely and restart the server, just restart the Unity application or just one or more select services.
When you run the Unity Scheduled Restart tool you enter the configuration dialog above. This allows you to select a time/schedule to restart the Unity server, decide if you want to reboot the server, restart Unity or just restart selected services, view the logs of previous restarts or do a test restart using the currently selected method immediately.
Messages will be written to the application event log indicating the start and completion of each step in the restart process and for any errors encountered.
When a restart is initiated, the following dialog is displayed so an interactive user has an opportunity to abort the process if necessary:
A dialog will pop up with a 30 second countdown before action is taken. If the selected action was to restart the server you’ll see one 30 second countdown before Unity is taken off line and then another dialog will pop up with a 30 second countdown before the server is forced to reboot itself.
A text log of all scheduled restarts is stored in the directory where the Scheduled Restart tool is installed. You can view the log directly or by selecting the “View logs” button on the configuration dialog. Information is also written to the application event log when scheduled restarts are run, see “Scheduling restarts” below for more information on these events.
This tool requires Win2K to run since it integrates with the Windows scheduler service.
Any version of Unity 2.4.6 or later as long as it’s running on Win2K. Note, however, that the message store manager, UMR, and TTS services were not added as separate services until the 3.x line so using the restart services option will not have much effect on a 2.x system.
You have 3 basic restart options, reboot the entire server, restarting just Unity or bouncing selected Unity services. You can schedule one or more of these in combination with one another if you like. For instance have the server reboot once a month and restart the message store manager service every week or the like.
This option will first shut down Unity nicely and once Unity is off line it will issue a command to reboot the server. Any open applications will be closed. It’s strongly recommended that if you use this option rather than restarting Unity itself – since Unity is dependant on several services such as Exchange, IIS and SQL, just bouncing the Unity services does not prevent problems with memory/resource leaks in other services on the box.
This option will shut down Unity and kill all the Avxxx services in the service control manager and then restart them. The only Unity related service that is not restarted in this process is the Tomcat service found on Unity 3.1(5) and later.
Again, it’s recommended that you reboot the server instead of just restarting Unity if you can.
You can start and stop the GAEN (error notification), message store manager, UMR (Unity Message Repository) synchronization server, and/or the TTS (text to speech engine) services. Stopping these services does not shut down Unity in the process. However while the TTS service is starting Unity will not be able to process text to speech requests and while the UMR service is restarting messages from outside callers will not be delivered. That said it only takes a few moments (less than 30 seconds normally) to restart these so the window of exposure is very low.
When the Schedule Restart tool is configured to reboot the machine, it first shuts down Unity cleanly and then shuts down SQL and waits for the services to stop. Once that has happened, the REBOOT.BAT file which is installed in the application’s directory is called. By default this runs a Microsoft provided reboot tool called SHUTDOWN.EXE with appropriate command line options to force a reboot in all cases. This option has been tested with many systems and in many configurations and works well under most conditions. However, if you would prefer to use another reboot tool such as the SHUTDOWN.EXE provided in the System32 directory on Windows2003 systems or the original EXITWINDOWS.EXE from the Microsoft resource kit (which also installs into the Unity Schedule Restart directory), you can simply reconfigure the REBOOT.BAT file to call one of these tools.
As a rule, however, the SHUTDOWN.EXE that is setup by default is best – you could only change this if there is a need to do so.
Each time the Unity Schedule Restart tool is run it generates a new log in the \logs folder under its installation directory. The logs are named “UnityScheduledRestart_Log_YYYYMMDD_HH_MM_SS.txt”. The time used in the hour (HH) field is in 24 hour format. Each time Unity Scheduled Restart tool is run it’ll delete log files older than 30 days found in that directory.
To schedule a restart, hit the “Schedule Restart” button on the configuration dialog. This will launch the Schedule dialog (above) which interfaces into the build in Windows scheduler. You may see other scheduled tasks in the list that are not related to the Scheduled Restart tool itself. You can edit their properties or delete them from in here but you can only add new tasks specific to the Scheduled Restart Tool via this dialog. Use the Windows Scheduler itself if you want to schedule other types of tasks.
To add a new schedule, hit the ‘Schedule Restart’ button. Provide a display name that will be shown in the schedule list to describe this task. Next, set the properties for the restart task. Do not adjust the path or the command line options, those are set for you automatically. By default the task is not enabled, be sure to check the “Enabled” option at the bottom of the “Task” tab. You set when and how often this task runs on the “Schedule” tab. When you have it configured as you’d like, click “OK”. You will be asked to provide the login name and PW of the account you’d like this task to run under.
You can schedule as many different Unity Schedule Restart events as you like. Each scheduled event includes a command line string that indicates which actions you would like taken during that session. For instance you can reboot the Unity server every Sunday morning and restart the message store manager service every Thursday or the like. These command line options are constructed using the options you have checked on the main form at the time you select the “Schedule restart” button.
As noted
above, when scheduled restarts are run the application event log is written to
for each stage of the restart process.
Each log entry has a source of “UnityScheduledRestart”
and a category of “Unity
Schedule Restart”. The following event log entries will be
written to the Applications Event log during restarts:
Event ID 1. “Unity Schedule Restart Initiated” – logged when the Schedule Restart tool fires up in shutdown mode. This will be logged either on a scheduled restart or when the user selects the “test restart now” button on the configuration dialog.
Event ID 2, “Unity Shutdown Complete” – logged when all the Unity services have finished shutting down.
Event ID 3, “Unity Restart Initiated” – This message will only be displayed if you have selected to only restart Unity.
Event ID 4, “Server Reboot Initiated” – This message will only be displayed if you have selected to reboot the server.
Event ID 5, “Error encountered
in Unity restart process. Error
reported=xxx”. This will be
logged when any error occurs, including a user intervening and stopping the
restart.
Event ID 6, ”Starting shut down of
service: (service name)”.
For each service you’ve asked to be stopped and restarted this
message will be logged at the time the shut down process starts.
Event ID 7, “Completed shut down of
service: (service name)”. For
each service you’ve asked to be stopped and restarted this message will
be logged at the time it finishes shutting down.
Event ID 8, “Initiating startup of
service: (service name)”. For
each service you’ve asked to be stopped and restarted this message will
be logged at the time it beings the restart process.
Event ID 9, “Completed start up process
for service: (service name)”.
For each service you’ve asked to be stopped and restarted this
message will be logged at the time it finishes starting.
Event ID 10, “Unity Scheduled Restart
completed”. When the entire
service restart process is complete this message will be logged
This tool comes with built in support for several languages including US English, French, German and Japanese. By default it will display the language the Windows operating system is set for. If that language is not supported it will default to US English.
To manually force the tool to show a different language than the default, you can select the Help | About menu option and click the “Change Language” hyperlink on the About box. The languages installed will be presented in a drop down list and the display will update into that language immediately when you select it.
NOTE: If you select Japanese as a display language and you are not running on a version of Windows that has the Japanese code page installed, the display will show all “?” characters. This is expected.
To check for updates to this tool, visit http://www.ciscounitytools.com
Version 2.0.19 – 8/26/2005
Fixed problem with resource DLLs for the Event Log messages – the Japanese version ended up being the default instead of English. CSCsb64484
Version 2.0.18 – 2/24/2005
Added additional option for forcing box reboots – added 2nd shutdown.exe option and spawn it through an external BAT file so folks can use their own restart tool if they so desire.
Updated to use Install Shield setup.
Version 2.0.17 – 6/23/2004
Changed the system restart logic to spawn an external application for kicking off the shutdown to prevent resource contention issues causing a lock in some scenarios.
Made the service shutdown somewhat more aggressive with extra “KILL” calls prior to the SQL service shutdown.
Version 2.0.15 – 3/2/2004
Included logic to shut down the SQL related services on the box before initiating a system reboot.
Updating the logging functionality
Version 2.0.14 – 8/27/2003
Fixed problem where the AVUmrSyncSvr service was taking longer to shut down than it reported which caused the service to not start up properly in some scenarios since it hadn’t finished stopping before the start command was sent.
Updated TDRT.EXE included in setup package.
Fixed problem with erroneous errors being reported in the event log during a restart process on 4.x servers. CSCec12087
Version 2.0.13
Added localization files for Unity 4.0(2) release
Added logic to kill services after shutting them down with Net Stop and before starting them with Net Start. This ensures that if the service erroneously reported it was down to the SCM that it was, indeed, down and will restart properly as expected.
Version 2.0.10
Fixed problem with unnecessary errors being logged to the application event log during the startup process when bouncing the Unity server – it was forcing the start of the Message Store Monitoring service before the AvCsMgr service was up and running which threw errors but didn’t keep Unity from coming up OK.
Version 2.0.9
Added option to restart selected services
Changed configuration from using registry keys to using command line strings such that users can select multiple restarts with different options if they wish instead of having only one static configuration.
Added additional event log messages
Version 2.0.8
Fixed some problems with the Japanese localization. Addresses CSCdz49262
Version 2.0.7
Updated localization files
Updated help
Version 2.0.6
Updated the Installer.DLL to use a more aggressive reboot sequence. A couple sites ran into problems by leaving desktop applications open and it would sit there waiting for a user to indicate if it’s ok to close it out or not. The new sequence doesn’t ask, it just restarts the machine – no iffs ands or buts.
Version 2.0.5
Added logic to handle new AvMsgStoreMonitorSvr service in Unity 3.1(5)
Version 2.0.4
Added support for localized versions in French, German and Japanese.
Version 2.0.2
Fixed CSCdw87233 – “Adding a schedule with same name as another cases dr. Watson”
Fixed CSCdw87141 – “Unity tray icon not updated after Unity only restart”
Fixed CSCdw87186 – “Log incorrectly states <during import process>”
Version 2.0.1
First version of Tool
© 2003 Cisco Systems, Inc. -- Company Confidential