473,837 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing an app to monitor a Windows service

I am writing a Windows Service that reads and processes files on a set
schedule. I want to create a second app that can monitor the Windows
service. The Windows service will write trace messages at certain
points while executing. The monitoring app I want to write will be
very simple, just picking up these traces and displaying them to show
progress of the service.

My question is what is the best method of communication between the
apps? The monitoring app may be run on the same machine or on the same
network as the service, but not, for example, over the internet.
Should I use named pipes? TCP client/server? Ideally, the service
would somehow be able to detect if there were any "listeners" and only
write the trace messages if any listeners were present.

I was wondering what others have done in this regard and can you
suggest some code or topics I should look at? What would be the best
way to accomplish this?

Thanks

Nov 21 '05 #1
3 2623
I wrote an application like you described. The Windows application just sat
in the System Tray & then the service would run under local system.

What I looked into before writing this application is remoting & I found
that was the best way to handle this.

Make sure you code security rights for accessing the files for both the
service & the Windows application

I hope this has shed some light on what you need to do.

One last thing: Do something to spoof your e-mail address, otherwise you
will be SPAMMED forever more

Crouchie1998
BA (HONS) MCP MCSE

"Chris Dunaway" <du******@gmail .com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I am writing a Windows Service that reads and processes files on a set
schedule. I want to create a second app that can monitor the Windows
service. The Windows service will write trace messages at certain
points while executing. The monitoring app I want to write will be
very simple, just picking up these traces and displaying them to show
progress of the service.

My question is what is the best method of communication between the
apps? The monitoring app may be run on the same machine or on the same
network as the service, but not, for example, over the internet.
Should I use named pipes? TCP client/server? Ideally, the service
would somehow be able to detect if there were any "listeners" and only
write the trace messages if any listeners were present.

I was wondering what others have done in this regard and can you
suggest some code or topics I should look at? What would be the best
way to accomplish this?

Thanks

Nov 21 '05 #2

Crouchie1998 wrote:
What I looked into before writing this application is remoting & I found that was the best way to handle this.

Make sure you code security rights for accessing the files for both the service & the Windows application
Thanks
One last thing: Do something to spoof your e-mail address, otherwise you will be SPAMMED forever more


Can you see my full e-mail address? When I look at the post using
Google Groups, it seems to hide part of my e-mail address
automatically.

Nov 21 '05 #3
Hi Crouchie, how did your windows service "publish" the data? Did it create
a log file to the event viewer / file system or did it "make it availabile"
via remoting?

I'll then presume the Systray app is configured to look at the server the
service is running on.

"Crouchie19 98" <cr**********@s pamcop.net> wrote in message
news:Od******** ******@tk2msftn gp13.phx.gbl...
I wrote an application like you described. The Windows application just sat
in the System Tray & then the service would run under local system.

What I looked into before writing this application is remoting & I found
that was the best way to handle this.

Make sure you code security rights for accessing the files for both the
service & the Windows application

I hope this has shed some light on what you need to do.

One last thing: Do something to spoof your e-mail address, otherwise you
will be SPAMMED forever more

Crouchie1998
BA (HONS) MCP MCSE

"Chris Dunaway" <du******@gmail .com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I am writing a Windows Service that reads and processes files on a set
schedule. I want to create a second app that can monitor the Windows
service. The Windows service will write trace messages at certain
points while executing. The monitoring app I want to write will be
very simple, just picking up these traces and displaying them to show
progress of the service.

My question is what is the best method of communication between the
apps? The monitoring app may be run on the same machine or on the same
network as the service, but not, for example, over the internet.
Should I use named pipes? TCP client/server? Ideally, the service
would somehow be able to detect if there were any "listeners" and only
write the trace messages if any listeners were present.

I was wondering what others have done in this regard and can you
suggest some code or topics I should look at? What would be the best
way to accomplish this?

Thanks


Nov 21 '05 #4

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

Similar topics

1
19617
by: HockeyTownUSA | last post by:
I am working a project where I am using two monitors and using HTML/Javascript to display the information I want. I have my main stuff on the main monitor, but when each page loads, I want an image to load fullscreen on the second monitor as well. I am using 800x600 resoution on both. If I use: function openWindow()
6
342
by: Kalyan | last post by:
Hi I need some idea, Is there any way to write vb code to monitor server activity and if server fails send out email to admin. thanks Kalyan
1
2865
by: Steffer [MCP] | last post by:
Hi NG I'm have made a server application (WinForms) but I would very much like to move the tasks that my app runs into a Windows Service. But have you any experience building an communication interface between the Gui and a Windows Service, I'd like to hear from you. Is the solution: Sockets - with commands and data send directly
7
4370
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
1549
by: Rui | last post by:
Can I write a windows service in .NET that monitors what happens on a server? (e.g.. which applications where started, what files where accessed, registry changes,...)
2
2201
by: Luc The Perverse | last post by:
I am a Java programmer - but I have had some experience programming in C++ before (3 years on a job) I have need of an application or set of applications to do the following on a windows machine: 1 - Passively monitor CPU and HD utilization, and if they drop to 0, and X number of seconds have passed, request the OS (windows) use its time to cache some files which may be launched. (The files would be user selectable 2 - Watch for...
1
2620
by: Kürþat | last post by:
Hi all, Is there any way(event, callback...) to monitor state of a service other than checking it periodically? Thanks in advance.
0
1461
by: iCodeSharp | last post by:
Hi, I haven't got a code problem..because i haven't created any code yet..but hopefully someone can put me in the right direction. I want to create a windows service that acts like redirector and monitor at the same time. I am creating an indexing application that is going to use multiple machines to perform the index. The service needs to know which machine(s) is/are idle so the service can send that machine a task to start indexing...
0
9843
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
9682
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,...
1
10623
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10272
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
9401
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...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7001
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5669
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...
0
5848
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.