Lifecycle Tab
Previous Topic  Next Topic 


The Lifecycle Tab defines service options relating to the lifecycle of the service and the application it is running as a service. The tab has two sections: Service Lifecycle and Pre-Shutdown.



Service Lifecycle Section


Field

Purpose

Upon Program Exit

This option provides granular restart control if the sub-process terminates intentionally or unexpectedly. Six options are available:


  1. Disabled: sub-process monitoring is disabled, and no reporting is performed.
  2. Restart the Program: attempt to restart the program again. These attempts are noted in the Event Log
  3. Terminate FireDaemon: FireDaemon Pro will hard exit. This allows control to be handed back to the Service Control Manager and for a restart to be performed by it in preference. When you specify this option the restart options in the Recovery tab are applied.
  4. Shutdown FireDaemon: FireDaemon Pro will terminate gracefully and execute any Post-Service applications (if defined)
  5. Report the Termination (no restart): the failure will simply be noted in the Event Log.
  6. Reboot. The computer will be rebooted.

Monitoring Interval

This is the number of milliseconds FireDaemon Pro will wait between probes of the sub-process to determine its running state. Thus a smaller value will cause FireDaemon Pro to check its sub-process more frequently. The minimum value for this setting is 50 msec. Note that on service start, FireDaemon Pro will wait for the Monitoring Interval to elapse before making the first check.

Flap Detection

This option is only enabled where sub-process restarts are selected in Upon Program Exit. Its purpose is to set an upper limit on the number of restarts that FireDaemon Pro will perform during the startup phase of the sub-process. Flaps are noted in the Debug log. Should the upper limit ever be reached, the selected action will be taken, namely:


  1. Terminate Process after: FireDaemon Pro will continue to run, but no further restarts are performed. The restart count will be reset back to zero if the service is restarted manually or as part of a scheduled restart.
  2. Terminate FireDaemon: FireDaemon Pro will exit immediately. Any Post-Service applications are NOT invoked. Actions specified in the Recovery settings will initiated.
  3. Shutdown FireDaemon: FireDaemon Pro will terminate gracefully and execute any Post-Service applications (if defined).


Note that Flap Detection is only applicable when the sub-process is initially launched. Once the process has been launched successfully, a PID has been assigned and the sub-process has been running stably for a period greater than the Monitoring Interval then Flap Detection is deactivated.

Flap Detection Retries

Where Flap Detection is enabled, this setting specifies the upper limit on the number of sub-process restarts.

Fail Detection

This option is only enabled where sub-process restarts are selected in Upon Program Exit. Its purpose is to set an upper limit on the number of restarts that FireDaemon Pro will perform during the entire lifecycle of the sub-process. Fails are noted in the Debug log. Should the upper limit ever be reached, the selected action will be taken, namely:


  1. Terminate Process after: FireDaemon Pro will continue to run, but no further restarts are performed. The restart count will be reset back to zero if the service is restarted manually or as part of a scheduled restart.
  2. Terminate FireDaemon: FireDaemon Pro will exit immediately. Any Post-Service applications are NOT invoked. Actions specified in the Recovery settings will initiated.
  3. Shutdown FireDaemon: FireDaemon Pro will terminate gracefully and execute any Post-Service applications (if defined).


Note that Fail Detection is only applicable once the sub-process has been launched successfully, a PID has been assigned, the sub-process has been running stably for a period greater than the Monitoring Interval and Flap Detection has been deactivated. Only then is Fail Detection activated.

Fail Detection Retries

Where Fail Detection is enabled, this setting specifies the upper limit on the number of sub-process restarts.

Graceful Shutdown

If this is checked, FireDaemon will send a message to the sub-process in order to allow it to gracefully exit. For console-based applications the CTRL_BREAK_EVENT or CTRL_C_EVENT message is sent to the process' console (based on the Console Application Send option below). For interactive GUI-based applications, a single WM_CLOSE message is sent to the top level window of the application. FireDaemon Pro then attempts to intelligently detect any popup windows that might result and send messages in the following order in an attempt to close them (IDCANCEL, IDABORT, IDOK, IDNO, IDYES). If the application does not close of its own accord it will be terminated after the Max Shutdown Delay elapses.

Max Shutdown Delay

If this time period elapses (in milliseconds) after the graceful shutdown message has been sent, and if the sub-process is still running, then FireDaemon Pro will forcibly terminate the sub-process.

Console Application

Select this if a Win32 console application is being run as a service. Examples include Java, Perl and 3rd party Win32 applications. This will cause a console control handler to be wrapped around the sub-process.

To Close Console Send

This radio button determines which message will be sent to the console application if Graceful Shutdown is checked. It can either be Ctrl+Break or Control+C.


Pre-Shutdown Section


Field

Purpose

Pre-Shutdown

[Vista, 2008 or later only] When checked, FireDaemon Pro will register the service to receive pre-shutdown notifications. During machine reboot or shutdown - services have a maximum of 20 seconds to shutdown. This allows services that need more time to terminate to shutdown gracefully when they can't necessarily do so quickly.

Pre-Shutdown Delay

Amount of time in milliseconds that the Service Control Manager will wait for the service to terminate (default is 180000ms = 3 minutes).

Shutdown Order List Inclusion

Include this service in the global list of Pre-Shutdown services allowing the Pre-Shutdown services to be ordered using the up and down arrows.