# Earthworm Modules:
Startstop Overview

(last revised 26 May, 2006)

This program starts and stops an Earthworm system. It reads its configuration file which specifies the message transport rings to be created, which modules are to be run, and the names of the parameter files each module is to read on startup. The program is system dependent, and there are versions available for the SUN Solaris and Windows NT operating systems.

Startstop reads its configuration file and creates the specified rings. It then starts each module as a child process, passing its configuration file name, and any other parameters as its command line paramters (argv, argc). Each module (child process) is started with the priority indicated in startstop.d. The system continues to run until "quit" is typed in startstop's command window. Startstop then sets a terminate flag in each transport ring. Each well-behaved module (child process) should periodically check for the terminate flag, and exit gracefully if is set.

If the user presses the "Enter" key while the startstop command window is selected, startstop will print a status table showing various statistics for each module, including whether it is dead or alive.

Startstop will also react to 'restart' messages from statmgr. This is part of a scheme wich works as follows: A module may have the token "restartMe" it its .desc file (the file given to statmgr, which tells it how to process exception conditions from that module). If its heartbeat ceases, statmgr will send a restart request to startstop. Startstop will then kill the offending module, and restart it with the same arguments as it did at startup time. There are some system specific features, listed below:

Solaris, Linux versions:

- Solaris startstop reads a configuration file named 'startstop_sol.d'
- Linux startstop reads a configuration file named 'startstop_unix.d'
- If a child process does not exit within a user specified time after the user types "quit", startstop terminates the child process.
- The amount of CPU time used by each child process is listed in the process status table.
- As of Version 3.0, Startstop can run in background. This modification was made by Pete Lombard at the University of Washington. Instructions
- To run Earthworm as other than root, you must set the file charateristics. Instructions

Windows, Windows Service version:

- Windows startstop and Windows startstop service read a configuration file named 'startstop_nt.d'
- Startstop never terminates a child process directly. If some child processes do not exit gracefully, the operator should reboot the computer before running startstop again.
- Startstop can be set to start automatically when Windows boots up, but probably better than doing that is to set startstop as a Windows service. Note if you set Startstop as a Windows service you'll need to use other command line utilities like 'status' and 'restart' to monitor and control earthworm modules since there's no interface to the Startstop service. You can run StartstopConsole in order to be able to connect to the session running earthworm, if you're not logged in as administrator. You'll be able to start and stop Earthworm with the Windows Services Control Panel.

  Module Index | Windows Commands | Solaris Commands | Linux Commands