Monitoring Multiple Instances of An Application Individually

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Monitoring Multiple Instances of An Application IndividuallyExpand / Collapse
Author
Message
Posted 8/1/2008 9:42:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/11/2008 4:16:37 PM
Posts: 3, Visits: 15
My organization uses a custom-developed Windows application (called GCRO) to receive asynchronous dialup data submissions from our clients. Multiple Windows servers host multiple instances of the gcro2003.exe application. Each instance runs from the single executable (GCRO2003.exe). Each instance is differentiated by syntax (a two-digit number) entered after the executable (example: grco2003.exe 21). The two-digit number identifies the phone line used by the instance of GCRO. We have four different servers that each run eight instances of the application simultaneously. Instances of the application often terminate unexpectedly due to various issues. When they terminate they must be manually re-executed. We’d like to monitor each individual instance of the application and be notified when one fails.

Monitoring via a WMI Active Monitor
The problem is that the WMI “Process” and “Process ID” counters both list the applications as “gcro2003.exe” only thus there’s no way to know specifically which instance it is using either WMI counter. For this reason I’ve thus far been unable to create an WMI Active Monitor for each instance for I cannot locate a WMI counter via the WUG Active Monitor setup wizard.

Monitoring via an Active Script Monitor
By using the Sysinternals “Process Explorer” application I see that the “Window Title” and “Command Line” values for each instance of the application are different.
Each window title value shows “GCROComm 97 – Line ##” and each command line value shows “C:\GCRO32\gcro2003.exe “##.

I downloaded the “Process_Checker” VBS script in an attempt to create a monitor that would monitor the specific WMI counters that contains a unique identification for each instance.
The WMI_ProcessStartup counter corresponds to the command line value seen in ProcessExplorer.
The WMI_ApplicationCommandLine counter corresponds to the command line value seen in ProcessExplorer

First I tried editing the script so that it queries the WMI_ApplicationCommandLine counter.
I edited the script so that sProcess = “C:\GCRO32\gcro2003.exe “## (to monitor the GCRO line 01 instance) and Set sProcess = objWMIService.ExecQuery("SELECT * FROM Win32_ApplicationCommandLine where Title='" & sProcess & "'").
This method failed for due to issues with the parentheses that are already used by the counter conflicting with those required for the VBS script.

Second I tried editing the script so that it queries the WMI_ProcessStartup counter.
I edited the script so that sProcess = "GCROComm 97 - Line 01" and Set sProcess = objWMIService.ExecQuery("SELECT * FROM Win32_ProcessStartup where Title='" & sProcess & "'").
This method will run however regardless of whether or not the application instance is running the monitor returns that it’s not detected thus is down.

I’m indifferent on which type of monitor is used as long each individual instance is monitored and reported individually.
If the WMI Active Monitor is the better option I need help finding the WMI WIN32_ApplicationCommandLine or WIN32_ProcessStartup performance counters from within the WUG “New WMI/Select Performance Counter” window.
If the Active Script monitor is the better option I need help determining why the script currently returns that the application is down when actually it’s up-and-running.

I opened a IPSwitch support case for this issue however was told nothing could be done if WUG doesn't show the performance counter(s) I need and they wouldn't support any VBScript.

Any assistance you can provide will be highly appreciated. Thanks.

Roderick
WUG Premium v12.0
Windows 2003 Server Standard R2


Roderick
WhatsUp Gold v11 Premium
Windows 2003 Standard SP2
Post #45846
Posted 8/13/2008 3:34:46 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/13/2008 3:29:24 PM
Posts: 1, Visits: 1
Here is something you can  try. May not work, but worth a shot. Often Times an ".exe" file can be renamed and still function correctly. Could you rename the ".exe" files like filename##.exe, filename##.exe, etc... so that each filename is unique. Then if they still work, you won't have to differentiate based on Commandline but can do so by filename (processname, caption, etc... WMI value that is already available)? Good luck, hope this works because if it doesn't you are going to have to customize the vbscript quite a bit.
Post #46249
Posted 8/28/2008 1:33:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/11/2008 4:16:37 PM
Posts: 3, Visits: 15
Here is something you can try. May not work, but worth a shot. Often Times an ".exe" file can be renamed and still function correctly. Could you rename the ".exe" files like filename##.exe, filename##.exe, etc... so that each filename is unique. Then if they still work, you won't have to differentiate based on Commandline but can do so by filename (processname, caption, etc... WMI value that is already available)? Good luck, hope this works because if it doesn't you are going to have to customize the vbscript quite a bit.


That's a good idea however all of the instances are executed from a single executable. The only thing that differentiates the instances is the command line syntax used when the executable is executed. You've got me thinking though.....I ask my developers if we could use multiple .exe's instead of this one and rename the .exe filenames sequentially.

I'll go about it that right. Thanks!


Roderick
WhatsUp Gold v11 Premium
Windows 2003 Standard SP2
Post #46644
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Jason Williams, Hush, FTPplanet.com, Hugh Garber, George Dailey, WUP-PM, mmulryan@ipswitch.com, mswimm

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 4:04am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 9 queries. Compression Enabled.