473,788 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitoring windows services

BC
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 ***
Nov 17 '05 #1
3 3606

"BC" <no****@devdex. com> wrote in message
news:eZ******** ******@TK2MSFTN GP10.phx.gbl...
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.Manageme nt 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.Manageme nt 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.
Nov 17 '05 #2
BC
Hi Willy,

Thanks for the reply. Basically what I want is awindows application that
allows me to monitor the activties (performance, exception errors...
etc) of a windows service that will be also create by me.
Cheers,

Benny

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
BC wrote:
Thanks for the reply. Basically what I want is awindows application
that allows me to monitor the activties (performance, exception
errors... etc) of a windows service that will be also create by me.


The best way to do monitor information is to add performance counters to
your service and use the performance monitor in XP.

The event log was designed to be the place for messages (like exception
details) from services. Unfortunately Microsoft provided a really bad
implementation of the code to log an event in v1.0 and v1.1, so I never
recommend people use the EventLog class to log events. The version of
this class in v2.0 is much better, and you can use it to log events
correctly, but unfortunately it also allows you to log events in the
incorrect way :(

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1640
by: Wally | last post by:
Hi Hi need to monitoring my windows service written in VB NET. How can my monitor application "feel" that my service has made something? Is the only way a polling (for example on a Db table)? Can't service generate events into monitor application? Where can I retrieve examples about monitoring windows services? Thank in advance and... sorry for my english, but I'm Italian! :-)
3
2326
by: JSheble | last post by:
I have a windows service that in the OnStart it creates a thread and runs a loop forever and ever, assuming the service is running. The loop stops during the OnStop event, and everything works exactly as expected. I also have an application that monitors that service using the ServiceController component, and allows me to start & stop the service as needed, as well as poll for it's current status. Still everything thus far works and...
7
13407
by: Mark | last post by:
Hello, I have researched and tried every thing I have found on the web, in groups and MS KB articles. Here is what I have. I have a Windows 2000 Domain Controller all service packs and every thing else from windows update. ..NET 1.0 and 1.1 installed on the server. Actually .NET was installed before the server was made a DC.
9
3215
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My questions are below... "David Good" wrote: > We have a network running both Win2k and Win2k3 webservers and our web sites > reside on a UNC network share that happens to be a Network Appliance NAS.
1
1336
by: russell.lane | last post by:
This is a health monitoring for web applications / web services question. I'm trying to set up health monitoring for web services and a web application. To start very simply, I want to turn on event logging for web requests. To do this I added the following markup to the <system.web> section of the web.config file in the service and application directories: <healthMonitoring enabled="true" heartbeatInterval="0"> <rules> <add...
1
1144
by: Sridhar | last post by:
Hi, I am trying to create a windows application that will monitor the windows services on a local computer or a remote computer. If any of the services fails, then it needs to email me saying that particular service has failed. How could I do that? Please let me know. Thanks, Sridhar.
7
4366
by: mojtaba_danai | last post by:
Hi Hope that some one can help with the following. I wish to write a Visual C++ program, which monitors 3-4 other services (process/programs also written in VC++). The program shall monitor, if the other processes are alive and to see, if they are sending heartbeat messages. I wish to do this for exampel via socket programming. Can any one tell me, the structure og guideline for this?
4
2154
by: RobKinney1 | last post by:
Hello, For security reasons, we need to start overhauling our old C++ applications to run as services instead of applications running on the admin account. I am re-writing these programs using C# now. If I make a service out of ProcessApplicationA, how do I monitor what normally would be going to the console output screen? I would like to be able to pull up an application on my local computer which is somehow in contact with all...
1
1647
by: Stuart Parker | last post by:
Hi... I'm messing about with windows services in vb.net 2005 and have the following question. I have a service which has a timer in it, which fires every minute - Textbook stuff I have a windows forms app which I would like to respond to the service firing an event For example. Service's timer triggers, and windows forms app then displays a message saying "Event Fired"
0
1425
by: mmuqu001 | last post by:
Hi All! I am looking for Network and System monitoring tool.I am new bie in this feild.so any suggestion would be welcome 1)Should be compatiable with *nix,FreeBSD,Windows. 2). You are to implement a System Monitoring solution that will do (among others) - Hardware health check: CPU, memory, storage, ... - Software health check: Web Services(Like in house services TerraFly Similar to google maps , textual/imagery requests).
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.