ADPlus.vbs - how to detect when the memory dump has completed?

H

Highlander

Hello all. Anyone familiar with ADPlus.vbs, the script used when
running the Microsoft Debugging Tools for Windows?

cscript adplus.vbs -hang -pn aspnet_wp.exe -pn inetinfo.exe -o
c:\<Path_to_Put_Files_in>

http://support.microsoft.com/default.aspx?scid=kb;en-us;286350

I've got a performance monitor alert configured to launch a batch file
that will run ADPlus.vbs on a remote (Windows 2000 Advanced) server,
and obtain a memory dump. It's all unattended and it works fine.

Works fine for one iteration that is. Problem is, I have to run 3
seperate memory dumps; at 3 minute intervals, and each new memory dump
cannot begin until the previous dump has completed. Using "start /wait"
before adplus.vbs in the batch file doesn't work, since adplus.vbs
spawns new processes which carry out the actual memory dump.

I've poked around thoroughly but I cannot find a command line friendly
way to detect when the memory dump has completed, so that I can have
the batch file sleep for 3 minutes, then repeat the command and launch
another one. Any help in solving this would be greatly appreciated!

- Dave
 
G

Guest

Highlander,

Download and install AutoIt from here: http://www.autoitscript.com/autoit3/

Make sure you download and install the beta version also. With AutoIt you
can compile a simple exe that will spawn each cscript process and wait until
it finishes before executing the next.

You can also access com objects with the beta so if you so desire, you can
convert the vbs to AutoIt entirely.

HTH,
Bill
 
H

Highlander

Highlander,

Download and install AutoIt from here: http://www.autoitscript.com/autoit3/

Make sure you download and install the beta version also. With AutoIt you
can compile a simple exe that will spawn each cscript process and wait until
it finishes before executing the next.

You can also access com objects with the beta so if you so desire, you can
convert the vbs to AutoIt entirely.

HTH,
Bill

Thanks for the suggestion Bill, but that's not really feasible. For one
I'm very limited at my place of work with what 3rd party apps are
allowed - I don't know about AutoIT. Also, it's not as easy as "compile
a simple exe that will spawn each cscript process" - the ADPlus.vbs
file is *huge* and extremely complex. I tried looking through it to
decipher how the spawned processes work, but I'm nowhere near the level
of VBScript knowledge needed to do so. I don't see how AutoIT is going
to be able to do that for me.

- Dave
 
G

Guest

Highlander said:
Thanks for the suggestion Bill, but that's not really feasible. For one
I'm very limited at my place of work with what 3rd party apps are
allowed - I don't know about AutoIT. Also, it's not as easy as "compile
a simple exe that will spawn each cscript process" - the ADPlus.vbs
file is *huge* and extremely complex. I tried looking through it to
decipher how the spawned processes work, but I'm nowhere near the level
of VBScript knowledge needed to do so. I don't see how AutoIT is going
to be able to do that for me.

- Dave
Dave,

You actually would be using your own application as it compiles into a
stand-alon exe without needing any .dlls.

How it would help you is calling the command line (exactly as you are using
it now) cscript adplus.vbs -hang -pn aspnet_wp.exe -pn inetinfo.exe -o
c:\<Path_to_Put_Files_in> using a command processor shell with a /c parameter
to close the command window after exxecution, from a runwait function that
will not execute the next statement until the present one finishes.

It has a vbs-like syntax, and what you are trying to do is fairly simple so
it shouldn't take you long to get it. There is also a very good AutoIT forum
for help.

It really is worth looking into.

Bill
 
N

Neil Pike

Dave,

The dumping process spawns cdb.exe to do it's work. Run tlist.exe (resource
kit) to list all processes, check for cdb.exe being there with findstr.exe. If
it is, wait a couple of secs and then retry until it has disappeared. Then
carry on with whatever other processing you want to do,
I've poked around thoroughly but I cannot find a command line friendly
way to detect when the memory dump has completed, so that I can have
the batch file sleep for 3 minutes, then repeat the command and launch
another one. Any help in solving this would be greatly appreciated!

- Dave

Neil Pike. Protech Computing Ltd
 
T

tron9901

Neil said:
Dave,

The dumping process spawns cdb.exe to do it's work. Run tlist.exe (resource
kit) to list all processes, check for cdb.exe being there with findstr.exe. If
it is, wait a couple of secs and then retry until it has disappeared. Then
carry on with whatever other processing you want to do,


Neil Pike. Protech Computing Ltd

Thanks Neil!

As it turns out, on Wednesday morning - probably right around the time
you started typing your post - I discovered cdb.exe as the spawned
process.

Actually I've used pslist (www.sysinternals.com) and findstr.exe to
check for when the cdb.exe process has completed. I'm all set.

Thanks again.

- Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top