473,383 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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 2574
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.googlegr oups.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.

"Crouchie1998" <cr**********@spamcop.net> wrote in message
news:Od**************@tk2msftngp13.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.googlegr oups.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
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...
6
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
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...
7
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...
4
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
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...
1
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
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.