‘Dfsrdiag.exe ReplicationState’: What’s DFSR up to?

‘Dfsrdiag.exe ReplicationState’: What’s DFSR up to?

  • Comments 9
  • Likes

A request we’ve received consistently from our customers is – How do I know what DFS Replication is currently doing on my server? In Windows Server 2008 R2, we have attempted to provide a way for administrators to better understand the state of replication on their servers.

This feature is available by virtue of a new command line switch for the dfsrdiag.exe diagnostic tool. The ‘ReplicationState’ (or ‘ReplState’) command line switch enables an administrator to query the DFS Replication service and retrieve information about the status of replication activity on that server.

This command line switch can be executed against servers running Windows Server 2008 R2 only. The output of this command line switch consists of a list of updates that are currently being serviced by the replication service on all inbound and outbound replication connections. Since this command line switch provides a point in time snapshot of replication activity on a server, it is possible to see whether replication is making any progress by comparing the output of this command obtained at different points in time.

We can better understand how to use this command for monitoring purposes with a sample setup as described below.

The setup

ContosoPub

Consider a replication group called ‘ContosoPublication’. The folder ‘ContosoPub’ is replicated between two servers (CONTOSO-HUB and CONTOSO-BRANCH) in this replication group. Typically, the administrator publishes data on the hub server (CONTOSO-HUB) and this data is replicated to the branch office server (CONTOSO-BRANCH) using the DFS Replication service.

An administrator may want to monitor the state of replication on either of the servers to better understand what the DFS Replication service is currently up to. The following sections explain how to use the new ‘ReplicationState’ command line switch for the dfsrdiag.exe diagnostic tool for this purpose.

 

Monitoring replication on the branch office server

In order to monitor the current replication state of the DFS replication service on these servers, the command ‘dfsrdiag.exe ReplicationState’ can be used. The /member (or /mem) option can be used along with the ‘ReplicationState’ command line switch to specify the server against which this command should be run. In this example, I’ve dumped a few files from the ‘Windows\System32’ directory into the replicated folder.

dfsrdiag ReplicationState /member:CONTOSO-BRANCHdfsrdiag_BoNonverbose

The verbose option (‘dfsrdiag ReplicationState /all’) prints out more information for each update. This includes the versioning information maintained by the DFS Replication service (UID, GVSN, Parent UID) and the replicated folder to which the update belongs.
 
dfsrdiag ReplicationState /member:CONTOSO-BRANCH /all
dfsrdiag_BoVerbose
 
Understanding the output of this switch 
 
  • Active inbound connection: These are connections over which data/updates are replicated in onto the server being monitored. In this example, the active inbound connection is used by the DFS Replication service to replicate updates from CONTOSO-HUB to the branch office server (CONTOSO-BRANCH). Expect to see at least one active inbound connection per replication partner for all replication member servers on which this command is executed. On a server which is replicating with many replication partners (such as a hub server), if the ‘ReplicationState’ command line is executed, the output will display all the current active connections with these replication partners.
  • Connection GUID: The connection GUID is a unique identifier which distinguishes individual connections on a DFS Replication member server.
  • Active outbound connection: This is a connection over which data/updates are replicated out to other replication partners from the server being monitored. In this example, the replicated folder ‘ContosoPub’ has been configured to be a read-only replicated folder on the branch office server (CONTOSO-BRANCH). Therefore, the branch office server will not have any active outbound connections – simply because it is not expected to replicate out any changes to its replication partners. That’s why the above output shows ‘Active outbound connections: 0’.
  • Sending member: This is the name of the replication partner which is sending data over this particular connection. In this example, the sending partner is the hub server (CONTOSO-HUB), which sends updates to the branch office server (CONTOSO-BRANCH) over the active inbound connection.
  • Number of updates: This value signifies the sum of the number of updates being currently processed for the given connection and the number of updates which have been scheduled for processing for that connection. In short,

Number of updates = (Updates being processed + Updates scheduled)

  • Updates being processed: This value signifies the number of updates that the DFS Replication service is currently processing. For an active inbound connection, this means that the DFS Replication service is downloading data corresponding to that update from its replication partner. For an active outbound connection, it means that the DFS Replication service is currently transmitting the update to its replication partner.
  • Updates scheduled: This value signifies the number of updates that have been queued for processing over the connection. Once the DFS Replication service is done with the updates that are currently being processed, it will begin to process these queued/scheduled updates.
  • Update information: This contains more information about the update including the name of the file, version information maintained by the DFS Replication service and the path. In case of files which are currently being downloaded or have been scheduled for processing, the path to the file may not always be available. In such cases the path is not logged in the output. Updates may also be directories contained within the replicated folder.

Monitoring replication on the hub server

The same command line switch can be executed against the DFS Replication service on the hub server (“dfsrdiag.exe ReplicationState /member:CONTOSO-HUB”) in order to monitor the state of the hub server.

-------

Mahesh Unnikrishnan

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • The Windows Server 2008 R2 Beta is now available. If you’re participating in the beta program or are

  • What's in it for Windows Server 2008? is there any solution for monitoring what's going on now in the DFS replication function....

    Bst Regards / Nicklas

  • Hello, do you know if are there something like this in Windows 2003 Std Server ? This utility is very good !!

    Today, I only look in my DFSR logs when we have some problem but this is not so "active"; the better is see errors in the moment they are occurring.

    Greatings

    MGaleti

  • Nicklas, on Windows Server 2003 R2, you can use the 'dfsrdiag.exe Backlog' command to get an idea of what files are currently backlogged/pending replication on a member server.

    The 'ReplicationState' command line option requires some support from the DFS Replication service itself (especially the ability to snapshot current replication state). Therefore, this functionality is not available on earlier versions of Windows Server (Windows Server 2003 R2 and Windows Server 2008).

  • MGaleti

    Thanks for the kind words - we're glad you like this feature. This command is good to get a snapshot of the current replication activity - it doesnt really surface errors in replication. If you're looking for active monitoring of the DFS Replication service, I'd suggest taking a look at System Center Operations Manager.

    We have a DFS Replication management pack - this keeps track of the error and warning events logged by DFS-R on each of the servers in the replication group. It also contains rules which tell the management pack when certain error conditions have been auto-corrected etc.

    The management pack is currently in beta and is available via connect.microsoft.com. If you're interested, please drop us a line using the 'EMAIL' link at the top of this page, and I'll send you information about how to subscribe to the beta program.

    Thanks,

    Mahesh

  • Do we have any update for 2003 R2 as well..??

  • Do we have any update for 2003 R2 as well..??

  • Yeah what about 2003 R2???????????????

  • I have been searching my Windows 2003 R2 install for the dfsrdiag.exe command to no avail.  Where can I find it?  Also, is there a way to tell if a system is using FRS or DFS replication?