views:

1511

answers:

2

Looking for suggestions for a method of capturing a memory dump while a user is running under terminal services. I have tried using "AdPlus" with WinDbg but the application runs under terminal services and it doesn't seem to like that combination.

(This is a VB.NET application.)

Similar to the following question but needs to allow the application to run under terminal services with no external dialogs. (Tried WinDbg in quiet mode, crashes the session.)

http://stackoverflow.com/questions/48148/tool-for-analyzing-net-app-memory-dumps

+2  A: 

adplus should work fine under terminal services -- we use it that way frequently. How exactly are you trying to use it.

One thing to watch out for with terminal service sessions is if the session itself has an idle timeout. We often had customer attached adplus to our service via a terminal services section and then wonder why the service died an hour later. The solution to this was to force the terminal service connection to use the console session (/console on the command line for mstsc).

Rob Walker
Nothing out of the ordinary. In a batch file started on logon - 'adplus -crash -quiet -dbg windbg.exe -sc XXXXXX.exe' Perhaps it's windbg that it doesn't like.
A: 

Because adplus runs from the command line, if you logout or a terminal services session times-out the script will stop.

One possibility to consider is using DebugDiag, it runs as a service as “Local System” so it’s not dependent on the logged on interactive user session.

You can configure the service to schedule memory dumps periodically and view/analyse the results later in another component of DebugDiag, all customizable via scripts.

Helpful links and download:

http://blogs.msdn.com/sukeshak/pages/ddintro.aspx

http://blogs.msdn.com/tess/archive/2009/01/23/net-hang-analyzing-debug-diag-output.aspx

http://www.microsoft.com/downloadS/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

Peter McGrattan