Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Performance Counters to track windows services

I'm working with a system that consists of several applications and services, almost all using a SQL database.

Windows services do different things at different times, and I would like to track them. Meaning that on some deployed systems we see the machine running high on CPU, we see that the sql process is running high, but we can't be sure about which service is responsible for it.

I wonder if Performance Counters are good for this job.

Basically I would like to be able to see at a certain moment which service woke up and is processing something.

It seems to me that I can end up having a perfcounter that only has the value 0 or 1 for each service to show if it is doing something, but this doesn't seem like a normal usage for perfcounters.

Are performance counters suitable?

Do you think I should track this in a different way?

like image 647
pauloya Avatar asked Sep 13 '09 20:09

pauloya


1 Answers

If your monitoring framework/approach already centers around monitoring performance counters, this is a viable approach.

Personally I find more detailed instrumentation necessary to really understand what's happening in my services (though maybe that has to do with the nature of my services).

I use .NET Logging Framework because it's simple and can write to multiple targets including log files, the event log, and a TCP socket (I have a simple monitor that listens on the logging socket for each app server and shows me in real-time what's happening).

like image 147
Eric J. Avatar answered Sep 22 '22 19:09

Eric J.