Replicated DFS - dfsrdiag.exe script Backlog 2008 64bit

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
zacherynuk
Posts: 26
Joined: Thu Jul 20, 2006 10:24 am

Replicated DFS - dfsrdiag.exe script Backlog 2008 64bit

Post by zacherynuk »

Hi,

I use the batch file below to return the current list of backlogged files and echo this to the console (for Shell Script) as well as exit with the errorlevel to be picked up in hostmonitor (For External Program).

This took me bloody ages, because of the %WinDir%\Sysnative part, which allows the 32bit command to access the system32 folder.... which was new to me!

Thought it may be of use to somebody else.

Code: Select all

SET EL=
for /F "tokens=6 delims= " %%A IN ('"%WinDir%\Sysnative\dfsrdiag.exe backlog /rmem:File02 /rgname:Replicationgroup1 /rfname:Foldername /smem:file01"') DO SET EL=%%A & GOTO finish
@echo Should Never Happen
:FINISH
IF %EL%==is SET EL=0
@echo SCRIPTRES:Host is alive:%EL%
EXIT /B %EL%
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Thank you.
BTW: Normally we use "Library" forum for such posts
http://www.ks-soft.net/cgi-bin/phpBB/viewforum.php?f=7

Regards
Alex
zacherynuk
Posts: 26
Joined: Thu Jul 20, 2006 10:24 am

Post by zacherynuk »

KS-Soft wrote:Thank you.
BTW: Normally we use "Library" forum for such posts
http://www.ks-soft.net/cgi-bin/phpBB/viewforum.php?f=7

Regards
Alex
Oh yeah :) oops
Post Reply