COMPlusSurvey
COMPlusSurvey is a small utility that monitors the evolution in time of a COM+ application in terms of CPU usage. There are ways to garantee a Windows 2003 stability when a COM+ application is envolved with the aid of Pooling and Recycling but none is so evident in Windows 2000. Motivation
I have a COM+ application that eats CPU alive after a few hours with no evident reason so i have to recycle it when the COM+ Surrogate exeeds an acceptable CPU quota (eg. application eats 50% of my cpu doing nothing (this is really a surprize)).
Using COMPlusSurvey
- Compile the source code on the desired platform(due to the incompatibility between COM1.0 and COM1.5)
- Edit the config file from the installation path(COMPlusSurvey.exe.config).
< add key="AppName" value="You COM+ application name" />
< add key="CpuNo" value="The logic number of CPUs" />
eg.
single processor without hyperthreading CpuNo=1
single processor with hyperthreading CpuNo=2
dual processor with hyperthreading CpuNo=4
< add key="DumpFile" value="The path to your log file"/>
eg.
value="C:COMPlusSurvey.txt"
<add key="AlarmLevel" value="cpu quota in percents (eg. 50)"/>
Testing COMPlusSurvey
To test this application i had to create a COM+ that simultes an abnormal behaviour.Whenever the interface is called (here i used a timer to trigger the calls at certain intervals) there are two threads that enter in an infinite loop consuming much of the CPU. Below there's the CPU graph and as you probably noticed the CPU quota is kept under 50% .
Why COMPlusSurvey can fail
Stopping the service is a total disaster since the COM+ application can fail compromising the server's stability. Solving the bugs is always a plus but this is not always possible so i encourage you to use this service in case the problem encounterd looks like mine.
Implementation Details
I could probably describe the implementation details but i'm too lazy to do that, so here's the source code. Use it, throw it, do what ever you want and leave me alone ;)
Download source code
|