SVCMON v0.8 - Windows NT Service Monitor



The SVCMON package is a Perl script and associated files whose purpose is to monitor and  automatically restart an NT service. It is intended to be used by system administrators, not end users.

README file
svcmon-0.8.zip (687K)

Please direct any comments or questions to:

Dennis Moul
dmm@city-net.com

Excerpts from the README file:

Introduction

In many NT environments, critical functions are performed by programs called "services". These are roughly equivalent to daemons in a unix environment, in that they run at in the background, are usually started at boot time, and have no keyboard/video user interaction. 

In the unix world, many daemons are started by the init process, which watches over them and will restart them if they stop. There is no equivalent in NT.

This is a serious problem in many NT environments, because some services have a nasty habit of either crashing (equivalent of a core dump) or simply stopping. Often there are no event log or logfile entries to provide clues as to why the service stopped. Administrators only find out when help desk calls start coming in. Many administrators just restart the service and hope it doesn't stop again too soon.

The SVCMON script addresses these problems at two levels. First, it monitors a service and will send an E-mail notification if the service stops. Second, it will try to restart the service automatically, with no administrator intervention.

The service monitor distribution includes the following files:

README.DOC - this readme file
SVCMON.PL - service monitor script
SVCMON.EXE - compiled .EXE version (no Perl interpreter required!)
SVCMON.CONF - sample configuration file
SVCLIST.PL - helpful script to list installed NT services
SVCLIST.EXE - compiled .EXE version
INSTSRV.EXE - service installation program from NT Resource Kit
SRVANY.EXE - program to run any .EXE as a service, from NT Resource Kit 
GPL.TXT - GNU General Public License

Limitations

    - SVCMON does not distinguish between a service that hasn't started up yet during the boot process and one that has stopped. The result is that you may get one alert E-mail every time your server reboots.
    - The SMTP mail notification is not particularly robust. If an error occurs there is no attempt at resending, There is no MX support, etc.
    - Only one service is monitored by any single installation of SVCMON, though multiple installations on the same machine can each monitor a different service.

Possible Enhancements

    - Support monitoring multiple services in a single installation and config file
    - Use a more robust SMTP implementation (look at existing modules from CPAN)
    - Support E-mailing via MAPI for organizations that don't use SMTP internally
    - Find a way to avoid the "e-mail on boot" problem

Licensing

The two perl scripts (svcmon.pl and svclist.pl) and this readme file are distributed under terms of the GNU General Public License. Feel free to copy and modify them as long as you follow the GPL (and also credit me as the original author).

Comments, suggestions, and improvements are welcome.

Contact Information

Dennis Moul
Senior Systems Architect
City Information Systems
City of Pittsburgh

dmm@city-net.com


[home]