How to Modify the [timelimitSecs] parameter of the 'NfNet.exe' Command in a Start/Stop Script

Follow

Summary

This Knowledgebase article provides information about how to modify the ' timelimitSecs' parameter of the 'NfNet.exe' command for badly behaved services.


More Information

Neverfail uses the 'NfNet' command to start and stop protected services in a Neverfail installation.  The 'NfNet.exe' command behaves similar to the “net start” and “net stop” commands in that:

  1. It performs the following actions:
    • Start a service, and any services it depends on.
    • Stop a service, and any that depend on it.
  2. It is more lenient than the “net “ commands on slow starting services in that s ervices are allowed a configurable period to get from the pending to the stopped/started state.
  3. It has the option not to block indefinitely on a hung service.
  4. It indicates success or failure.

In situations where a protected service behaves badly (fails to complete a start or stop action within the allocated time limit), Neverfail allows you to modify the time limit by changing the [timelimitSecs] parameter of the 'NfNet' command to allow more time for the service to start or stop.

NfNet Start:

Starts the requestedService and all services that it depends on. If any of these services is badly behaved and takes longer than timelimitSecs seconds to start, then the command completes immediately with a failure status and the requestedService may or may not subsequently start. If the requestedService and all services it depends on are well behaved, the timelimit is ignored.

Syntax: NfNet START requestedService [ timelimitSecs ][/Q] [/R] [/T]

Options:

Option

Function

requestedService

The name of the service to start.

timelimitSecs

Time allowed for a service to start if it is badly behaved.
Default=90 seconds.

/Q

If /Q is specified, nothing is printed unless there is an error

/R

Turns on a report msg that the AppMgr can parse.

/T

Turns on debug print. (Won’t be in the usage message.)

NfNet Stop:

Stops the requestedService and all services that depends on it. If any of these services is badly behaved and takes longer than timelimitSecs seconds to stop then the command completes immediately with a failure status and the requestedService may or may not subsequently stop. If the requestedService and all services that depend on it are well behaved, the time limit is ignored.

Syntax: NfNet STOP requestedService [ timelimitSecs ] [/Q] [/R] [/T]

Options:

Option Function
requestedService The name of the service to stop.
timelimitSecs Time allowed for a service to stop if it is badly behaved.
Default=90 seconds.
/Q If /Q is specified, nothing is printed unless there is an error
/R Turns on a report msg that the AppMgr can parse.
/T Turns on debug print. (Won’t be in the usage message.)

How to Modify the Parameter:

To modify the [timelimitSecs] parameter of the 'NfNet.exe' command, simply edit the appropriate Start.bat or Stop.bat file located at C:\neverfail\R2\scripts to include a value in seconds as shown above.  The default value for the 'NfNet.exe' command is 90 seconds. For examples of both the start.bat and stop.bat with modified [timelimitSecs] parameters, see below.

Example NfNet Start: This would provide 180 seconds for the MS Exchange System Attendant service to start.

NfNet Start "MSExchangeSA" 180 /R

Example NfNet Stop: This would provide 180 seconds for the IISAdmin service to stop.

NfNet Stop "IISADMIN" 180 /R || set FAILED=1


Applies To

All Versions


Related Information

Knowledgebase article #214 - Troubleshooting Exchange Startup Problems

Knowledgebase article #241 - During a Switchover of Microsoft Exchange, the SMTP Service fails to stop, resulting in an Application Manager timeout exception. Replication does not start after the Switchover has completed

Knowledgebase article #995 - How to Configure Application Start/Stop/Monitoring Processes

KBID-1176

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.