TIBCO Spotfire® Server and Environment - Installation and Administration

Shutting down node services gracefully through script

To shut down services running on a node manager without immediately shutting down (and potentially disturbing end users work), start a delayed or graceful shutdown using the command line on the node manager local host.

About this task

This technique is similar to using the Scheduled shutdown functionality from Nodes & Services, but it affects all running services on the node manager local host.

Typically, this technique can be useful when the host is shutting down: For example, for a scale in event or if the host is replaced, then the script is usually integrated in another custom script that might also shut down the node manager after the services have shut down and perform additional necessary logic.

On Linux

  1. From the terminal, navigate to the folder containing the file graceful-shutdown.sh.

    By default, this file is located in /opt/tibco/tsnm/version/nm.

  2. Run the script by entering ./graceful-shutdown.sh <n> <delete>, where <n> represents the length of the delay before shutdown in seconds, and <delete> is either true (the node manager is deleted on shutdown) or another value, which is interpreted as false (the node manager is not deleted on shutdown).

On Windows

  1. From the command-line interface, navigate to the folder containing the file graceful-shutdown.bat.

    By default, this file is located in C:\tibco\tsnm\version\nm.

  2. Run the script by entering ./graceful-shutdown.bat <n> <delete>, where <n> represents the length of the delay before shutdown in seconds, and <delete> is either true (the node manager is deleted on shutdown) or another value, which is interpreted as false (the node manager is not deleted on shutdown).

Results

The services shut down when <n> seconds have elapsed, and if <delete> is true, then the node manager is deleted.