Re: Monitoring windows services
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Tue, 18 Oct 2005 00:19:55 +0200
"BC" <nospam@xxxxxxxxxx> wrote in message
news:eZT4tT20FHA.2932@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I have a windows service (on client machine) that monitors a MSMQ queue
> (on server machine). When a new message is in the server queue, the
> client windows service will get the message and does some process.
> What I want to do now is create a small windows application that sits on
> the client machine and monitor the activities of the windows service.
> I am using Visual Studio .NET 2003 with C#.
> The question is how can I monitor a windows service? Any related
> articles will be great.
>
>
> Cheers,
>
> Benny
>
> *** Sent via Developersdex http://www.developersdex.com ***
What exactly do you mean with "monitor", if you didn't implement your
service such that it could be monitored there is very little to be
monitored. Sure you can control the state of the service, like starting
stopping etc. but if you need to monitor it's activity you should expose
some objects and/or counters data, lets say the number of MSMQ processed
sent so far.
You have several options depending on your requirements, but you will need
to add some code to your service; the easiest is to publish performance
objects through private performance counters and use the performance monior
to watch these counters.
Another option is to use System.Management classes to expsose performance
objects or state info by publishing these objects through the WMI system,
this is the way most Msft services like IIS, ASP.NET, SQL Server... publish
their state/performance data. Any client (.NET using System.Management and
others using COM and or scripting) can be built to query the exposed
objects. Note that the latter option can also be used to manage the service.
Willy.
.
- Follow-Ups:
- Re: Monitoring windows services
- From: BC
- Re: Monitoring windows services
- Prev by Date: Re: GetHashCode
- Next by Date: Re: int casting error when trying to retrieve value from comboBox
- Previous by thread: Nulls and Database objects
- Next by thread: Re: Monitoring windows services
- Index(es):
Relevant Pages
|