MOM 2005 Maintenance Mode Summary

A much requested feature from MOM 2000. But there are quirks with it.

 

It is recommended that when servers are being worked that they be put into maintenance mode. This prevents the console from receiving new alerts from that server while it is being worked on. The console also shows that the server is in maintenance mode by showing a small spanner by the server’s name.

 

There are three methods of putting a server into maintenance mode. This can be done via the console gui or via a choice of two command line utilities. These are MOMinfo.exe which is part of the MOM 2005 Resource Kit and MaintenaceModeUtility.exe which is provided as part of the MOM 2005 SDK.

 

1. Console GUI

 

In the console right click on the server and click “Put Computer in Maintenance Mode”. In the dialogue box there is a box for the reason and a choice of putting the server into maintenance for a duration in minutes or putting it in maintenance mode until a specific end time. Note that there is no ability to schedule a start time.

 

Once in maintenance mode the server will display the spanner icon and stay in that mode until the time set. If maintenance is finished early then the server can be right clicked again and chose “Remove Computer From Maintenance Mode”. You will be asked to confirm that.

 

If the work needs to carry beyond the original end time then right click and chose “Update Maintenance Mode Duration” and you will see the same dialogue box as when you first put the server into maintenance mode.

 

2. Command Line

 

The difference between the two utilities is that MOMinfo.exe works at the agent whereas MaintenaceModeUtility.exe works at the MOM server and is generally the preferred method.

 

2a. MOMINFO

 

This utility is also used for dumping rules that the agent is running, clearing queues and enable script debugging.

 

MOMInfo.exe /maintenancemode:<timeout>

 

The time is in seconds and if no time is set it defaults to -1 which is infinite. Run the utility set to “exit” to remove the server from maintenance mode.

e.g.       MOMInfo.exe /maintenancemode:exit

 

Optional           /server:<servername> to run it on a remote server.

 

If no server is chosen then it defaults to the server that it is installed on.

 

Because this tool initiates the communication from the agent, if the agent cannot contact the MOM server, the agent will not appear to be in maintenance mode in the console.

 

This is best run as a scheduled task when you know that maintenance work will be done and the length of time.

 

2b. MaintenaceModeUtility

 

This is provided as a VB project to compile and also to alter to suit your requirements. However a compiled version exists at

 

http://www.momsolutions.org/Tools/MaintenanceModeUtility/Maintenance.htm

 

Version 1.0 is the sample code compiles and version 1.01 has been altered to add a timeflag. Copy the exe and the dll to a directory on the MOM server’s hard disk.

 

MaintenanceModeUtility -a DOMAIN ServerName 120

 

The time is in minutes. This is generally more useful that mominfo which is in seconds.

 

Usage:

MaintenanceModeUtility.exe -l|-g|-a|-r [ComputerGroupName time]|[ComputerDomain ComputerName time]

 

-l: lists all computers in maintenance mode.

-g: lists available computer groups.

-a: places computers in maintenance mode.

-r: removes computers from maintenance mode.

 

Examples:

MaintenanceModeUtility.exe -l

MaintenanceModeUtility.exe -g

MaintenanceModeUtility.exe -a ComputerGroupToAdd time

MaintenanceModeUtility.exe -r ComputerGroupToRemove time

MaintenanceModeUtility.exe -a DOMAIN ComputerToAdd time

MaintenanceModeUtility.exe -r DOMAIN ComputerToRemove time

 

Again this is best run as a scheduled task when you know that maintenance work will be done and the length of time.

 

Tip 1

 

As this utility has the ability to run against a computer group you can set these groups up and have a scheduled task for each group if there is always the same maintenance window. Alternatively have the one scheduled task with the computer group and change the date and time to start as required and include a list of servers in the group for that particular work window.

 

Tip 2

 

Justin Harter has written a script that will create a scheduled job on the fly and then delete itself when finished.

 

Info and script at

http://spaces.msn.com/jharter/blog/cns!39CE28DB5474A6C7!293.entry

 

About these ads
This entry was posted in Microsoft Operations Manager. Bookmark the permalink.

One Response to MOM 2005 Maintenance Mode Summary

  1. Pete says:

    Nice. A very thorough (and accurate) accounting.
     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s