We have several services (mainly console applications) running on several remote computers.
I need to implement some form of watchdog timer to make sure all these services are running as expected.
Some services are performed using the Windows Task Scheduler, and some of them are long-running applications.
What would be the best way to register these applications? I do not want to change my running services.
I have administrator access to all machines.
Several options come to mind:
For long-term applications: Use psexec and get a list of running processes and make sure my application is on this list.
For tasks called by the task scheduler: Use psexec and query schtasks and find out when my services were started and what the return code was.
Do you have any other ideas?
For the record, this will be implemented in C # / WPF.
EDIT:
Well, I decided it pretty straight forward. Thanks for your input.
Source : http://pastebin.com/fr6dDMp5
source share