Next Topic

Previous Topic

Home

Book Contents

Book Index

How the LogScv (Log Service Failures) application works

The LogScv application is used when a MonTel service fails

It will not work with other services.

A service is defined as failed, when it exists without sending a 'I am stopped' message to the service controller in windows. MonTel services can do that under two basic conditions. Either they internal generate an 'Unrecoverable error', which will be logged as such... or they 'crash' usually the result of a memory access violation. Generally these are the result of programming errors or some time from local conditions of the computer (running out of resources, or associated DLL's or other applications failing).

A service that is stopped by user interaction, or by a system shut down or under orders from the system is not a service failure.

LogSvc will not work if the network has failed even if the LogSvc.exe is located on the same computer. MonTel services will generally not crash because of a network failure in any case.

How it works.

The windows service control manager's process will start LogSvc.exe when it has been set to do. This can be seen in the service control panel applet under the recovery tab for that service (see the example below).

When it starts, it logs messages to the same log file used by the relevant service, and also send messages to MonTel Service control manager (for example MtAdmin).

It will wait for a period of time specified in DefaultServiceRecoverWaitTimes or in the *RecoverWaitTimes specific for that service, and then restart the service. To prevent LogSvc from restarting the service, set the value to -1. The default is to wait 5 seconds for the first failure, and 82 seconds for each one after that.

While technically not a service failure, MonTel 'unrecoverable' errors behave like one. So if a service stops because of a MonTel 'unrecoverable' error it will not tell the Service Control manager that it is stopping, thus forcing a service failure and allowing the recovery system to activate.

This can be turned off with the setting ShowServiceStoppedOnUnrecoverableError = 1 in the [Program] section of PABX.INI (Use Edini32.exe).

One problem that could occur is that after an update, a setting might have changed or a file is missing such that a MonTel Service fails on start up. This can cause a loop where LogSvc starts, restart the service, but before you can stop the service it has started LogSvc. The quick way around this is to set the service start up type to Disabled in the applicable service control manager in MtAdmin.

Installation

To install the recovery information automatically, from the command line of a DOS box or CMD prompt opened up on the MonTel application folder, run the command 'RECOVERY' after the name of the service executable. For example:

F:\MT_SER\Apps>serversv recovery
Netwiz MonTel Server: Adding the recovery information.
Netwiz MonTel Server: Service recovery information added.

To remove the recovery information, use the UNRECOVERY command. For example:

F:\MT_SER\Apps>serversv recovery
Netwiz MonTel Server: Adding the recovery information.
Netwiz MonTel Server: Service recovery information added.

To install LogSvc.exe manually as a recovery agent for a service, you will need to set the Recovery tab in the services control panel applet. Select the appropriate MonTel or NEtwiz Service. Then right click for properties. On the properties select the 'Recovery' tab.

Change all the' Select computer response if this service fails' items to "Run a file". Set the 'Reset fail count after' to "1 day".

In the 'Run file' group box set 'File:' to "\\[SERVER]\[SHARE]\[PATH]\logsvc.exe" where [SERVER], [SHARE] and [PATH] combine to represent the MonTEl application folder or path. This will be the same as NetworkApplicationPath.

Set the 'Command line parameters:' to "/app=[SERVICE_NAME], where [SERVICE_EXE] name is the name of the service executable with out the .exe extension. The current MonTel service names is: serversv, serqslsv, monexsv, monimpsv, and faxmonsv.

And check the check box to tick 'Append fail count to end of command line (/fail=%1%].

The result should look something like the following screen.

------------------------------