Вопрос

I have several COM+ applications, each with several components and running instances. I can look at the Component Services management applet to see statistics (call time, pooled, activated, in call, etc.). I'd like to get programmatic access to this same information so I can write a monitoring tool to send alerts if things get backed up.

Unfortunately, I can't seem to find a C# API or PowerShell script that provides actual instance information. I can get all kinds of information about the actual application, and it's constituent components, just nothing about the running instances.

I've seen this page that talks about "COM+ Tracking", and it sounds like exactly what I need, but I'm not sure how to translate that to C#.

I've also successfully used PS to get to the COM+ Administration Collections, but the "ApplicationInstances" collection doesn't contain anything about actual metrics.

Any ideas? Thanks much in advance!

Это было полезно?

Решение

I found this article and code sample which pretty much answers my questions.

Note that in order to install the code sample, I had to manually extract the contents from the installer using 7-Zip. The installer itself would throw an error when running on Windows 7 for some reason.

I haven't completed yet, but I expect to be able to modify this solution to use the COM+ Tracking interfaces (namely the IComTrackingInfoEvents interface), which provides the granularity and information I need (call durations, etc.)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top