Mastering Microsoft Exchange Server 2007 SP1

In Chapter 6, "Scaling Upward and Outward," we talked about monitoring your system. Most of the examples and performance monitor counters we discussed were really targeted toward determining whether it is time to expand the capacity of your system and to help you find bottlenecks. There is certainly overlap between "insufficient capacity" and a "healthy Exchange server," though.

In this section, we'll look at some Exchange and Windows tools that you can use to determine whether your server is healthy and processing messages.

Checking Queues

Confirming that e-mail message are being delivered is one of the most basic and important things that you do when managing an Exchange environment. The Queue Viewer tool is usually your front-line monitoring and troubleshooting tool. Queue Viewer is found in the Toolbox work center of the Exchange Management Console. Figure 21.19 shows the Queue Viewer interface.

Figure 21.19: Managing queues on a Hub Transport server

The first thing you need to know about the Queue Viewer is that it communicates with servers that have the Hub Transport role. Since queues are only maintained only on the Hub Transport server, there is no reason for it to communicate with another server role. Figure 21.19 shows the Queue Viewer being used to view the queues on server hnlex03.volcanosurfboards.com; the Microsoft Exchange Transport service must be running on the Hub Transport server. You can use the Connect to Server task in the Actions pane to connect to a different Hub Transport server.

Looking at the queues in Figure 21.19, we can tell a little about the messages that are waiting to be delivered. In this particular environment, server hnlex03 hosts a Send connector and is responsible for delivery to the Internet. It is also a bridgehead server for a legacy Exchange routing group connector to an Exchange 2000/2003 routing group.

The first column in the Queues listing is the Next Hop Domain column; it shows the destination Internet domain, remote smarthost, remote Hub Transport server, or legacy routing group. The Delivery Type column also shows some interesting information about a particular queue:

The Status column of the Queue Viewer gives you some indication of what the queue is currently doing. There are four possible status values in the Exchange 2007 Queue viewer:

Notice the Last Error column in the Queue Viewer; this column can usually give you some helpful troubleshooting information about why the messages are not being delivered. We have staged a couple of different potential errors in Figure 21.19 that represent some typical problems. We moved the Last Error column over further to the left and widened it some in this screen capture so that you could see it more clearly. In the default Queue Viewer interface, you may need to scroll to the right to see the Last Error column.

A common complaint about the Queue Viewer interface is that the Last Error column is difficult to read if there is much text in the column. You can move the mouse pointer over the text and you will the text in that column expand in much the same way that" flyover' 'or" mouse over" help works. That still may not be of much help if you need to get a copy of the actual message. That is one place that the EMS cmdlet Get-Queue comes in really handy. Here is a example of using the Get-Queue cmdlet with no parameters:

Get-Queue Identity DeliveryType Status MessageCount NextHopDomain -------- ------------ ------ ------------ ------------- HNLEX03\95 DnsConnec... Retry 2 cta.net HNLEX03\96 DnsConnec... Retry 1 microsoft.com HNLEX03\98 SmartHost... Active 1 [192.168.254.43] HNLEX03\100 DnsConnec... Retry 1 volcanosurf.com HNLEX03\101 DnsConnec... Retry 1 gmail.com HNLEX03\102 SmtpRelay... Retry 3 cn=first routing.. HNLEX03\Submission Undefined Ready 0 Submission

The Get-Queue cmdlet outputs the queue identity; that will prove to be really useful in troubleshooting. You can use this queue identity as input for the Get-Queue parameter; here is an example for getting all of the information for a particular queue:

Get-Queue "hnlex03\95" Identity DeliveryType Status MessageCount NextHopDomain -------- ------------ ------ ------------ ------------- HNLEX03\95 DnsConnec... Retry 2 cta.net

You can pipe the output of the Get-Queue cmdlet to the Format-List cmdlet and get the details of the specified queue:

Get-Queue "hnlex03\95" | FL Identity : HNLEX03\95 DeliveryType : DnsConnectorDelivery NextHopDomain : cta.net NextHopConnector : Status : Retry MessageCount : 2 LastError : 451 4.4.0 Primary target IP address responded with: "421 4.2.1 Unable to connect." Attempted failover to alternate host, that did not succeed. Either there are no alternate host, or delivery failed to all alternate hosts. LastRetryTime : 12/30/2006 11:47:03 AM NextRetryTime : 12/30/2006 11:57:24 AM IsValid : True ObjectState : Unchanged

When you highlight a particular queue in the Queue Viewer, the Actions menu gives you a number of different options for managing it. These are shown in this screen shot.

The following tasks appear in the Actions pane when you select a particular queue:

Figure 21.20: Viewing the messages queued up in a specific queue

Notice that a filter is automatically created that filters the messages in a specific queue ID.

The Queue Viewer's Messages tab allows you to see all of the messages that are queued for delivery as well as additional information such as the message size, message subject, and the Queue ID and Last Error columns. The Messages tab also allows you to specify a filter based on the sender, Queue ID, spam confidence level (SCL), Size (KB), date received, expiration time, status, or subject. Figure 21.21 shows the Messages property page with a specific sender filter (From Address) applied.

Figure 21.21: Viewing and filtering all queued messages

From the Messages tab, you can select one or more messages and suspend, resume, or remove them. There are two remove options; you can remove the message and send an NDR or you can remove the message without sending an NDR. The Properties task on the Actions pane allows you to view more detailed information about the message. The General property page for one of these messages is shown in Figure 21.22.

Figure 21.22: General properties of a queued message

On the General property page, you can see detailed property information about the selected message. This includes the full text of the Last Error message as well as the identity of the message. The identity of the message can be used with the EMS queue management cmdlets Get-Message, Export-Message, Suspend-Message, Resume-Message, and Remove-Message. Hereisanexample of retrieving queued messages using the Get-Message cmdlet:

Get-Message Identity FromAddress Status Queue Subject -------- ----------- ------ ----- ------- HNLEX03\95\128 supatana@som... Ready HNLEX03\95 Aloha HNLEX03\95\131 supatana@som... Ready HNLEX03\95 R&D budget f... HNLEX03\96\134 supatana@som... Ready HNLEX03\96 Outbound mai... HNLEX03\98\140 supatana@som... Ready HNLEX03\98 Product test... HNLEX03\100\143 supatana@som... Ready HNLEX03\100 Can you send... HNLEX03\101\146 supatana@som... Ready HNLEX03\101 More informa...

From this listing, you can get the identity of the message you are interested in viewing more information about. If the listing is larger (dozens or hundreds of messages), you could use the Where cmdlet to narrow the search. For example, if you know that the subject includes the word Aloha, you could use a search such as this:

Get-Message | where {$_.subject -like "Aloha"} Identity FromAddress Status Queue Subject -------- ----------- ------ ----- ------- HNLEX03\95\128 supatana@som... Ready HNLEX03\95 Aloha

Once you have the message identity, you can use the following command to retrieve more information about the queued message:

Get-Message "hnlex03\95\128" -IncludeRecipientInfo | FL Identity : HNLEX03\95\128 Subject : Aloha InternetMessageId : <C27B18ED17ABBB4CBFC6346F93820D1B26C8CA54E2@HNLEX03.volcanosurfboards.com> FromAddress : supatana@somorita.com Status : Ready Size : 3284B MessageSourceName : FromLocal SourceIP : 255.255.255.255 SCL : -1 DateReceived : 12/29/2006 11:10:52 AM ExpirationTime : 12/31/2006 11:10:52 AM LastError : 400 4.4.7 Message delayed RetryCount : 0 Queue : HNLEX03\95 Recipients : {test@cta.net} IsValid : True ObjectState : Unchanged

Note that this example includes the -IncludeRecipientInfo parameter; if this parameter was not included, the Recipients information would be blank.

Monitoring Health

Performance monitoring is one of the more important tasks that administrators need to do for their mail systems. A clear picture of your server's performance may help you to find bottlenecks or performance problems before they affect your users. Yet performance monitoring is something that most Exchange administrators seem to avoid like the plague.

Performance monitoring is not rocket science; it is not even nearly as difficult as most people think (or fear) it is. Often, the challenge to performance monitoring is in knowing which counters and thresholds indicate a possible performance problem. We hope to remedy that in this chapter, but at the very least we hope to get you started.

If you have not read Chapter 6, you should go back and review the section on performance monitoring. There is quite a bit of overlap between these two chapters, though in that chapter we focused on counters that might indicate the need to scale additional servers or add additional hardware resources. In this chapter, we are going to focus more on counters that indicate performance problems and server health.

Using Performance Monitoring Counters

Let's now look at some of the counters that you may find useful when monitoring performance problems or looking for bottlenecks. Before we jump into this discussion, though, here's a review of a few tips for performance monitoring:

Memory Counters

Provided you have sufficient memory in your server, it won't usually be a bottleneck for Exchange 2007. We recommend that you have more than just the minimum amount of RAM in your servers. If you suspect memory problems, there are some counters that will prove to be very useful when making this determination. Table 21.4 shows some common performance monitor counters and some recommended values to watch for.

Table 21.4: Counters That May Indicate a Shortage of Physical Memory

Open table as spreadsheet

Object/Counter

Explanation\Recommendation

Memory/Pages/sec

This is the number of pages per second that Windows had to either retrieve from the page file or write to the page file due to a shortage of physical memory. This value should not exceed an average of 10 pages per second during typical activity.

Memory/Available Mbytes

This is the total amount of physical memory that is available to Windows. This value should be greater than 10 percent of the total amount of physical memory in the server.

Process/Working Set

The Working Set counter for each instance of the process running on Windows can be viewed and this can give you an idea of how much memory each of the processes running in Windows are allocating.

Processor Counters

In most cases, the processor subsystem of a server is not usually the bottleneck or the cause of performance problems. Table 21.5 shows some of the common counters that you can us

Категории