Changes between Version 29 and Version 30 of startstop


Ignore:
Timestamp:
11/15/11 23:09:12 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • startstop

    v29 v30  
    3131Completely shuts down EARTHWORM and all modules/ rings.  
    3232 
     33Pau is invoked from the command line (provided you have the earthworm environment variables set from the appropriate script in the environment directory) by typing: 
     34{{{ 
     35pau 
     36}}} 
     37OR pau can take as an argument the location of a startstop*.d file.: 
     38{{{ 
     39pau startstop_nt.d 
     40}}} 
     41 
    3342 * The command line equivalent of "quit".  
     43 * Pau uses startstop's configuration file, startstop*.d to shutdown the entire Earthworm system. 
     44 * The pau command line utility sends an Earthworm TERMINATE message, which should result in the entire Earthworm system shutting down. Pau depends on the earthworm environment variables being set (from the appropriate script in the environment directory), or it depends on your giving the startstop configuration file as the one parameter. 
    3445 
    3546=== pidpau === 
    3647Given an Earthworm module process ID, pidpau stops it. 
    3748 
     49{{{  
     50pidpau <pid> 
     51}}} 
     52 
    3853 * The command line equivalent of "stopmodule". 
     54 * The pidpau command line utility requests that a Earthworm terminates the particular module associated with the pid (Process ID) you give pidpau as a parameter. The module should stop itself if it's behaving properly. 
     55 * The program attaches to earthworm's shared memory region(s) and sets the flag in the header to the given value (pid). This is intended to signal that pid to terminate gracefully. 
     56 * If one isn't specified as an optional parameter, Pidpau uses startstop's configuration file, startstop*.d to enable it to attach to the shared memory regions. 
     57 * Pidpau needs the process id (pid) of the module it's attempting to stop. You can find out the process id by getting the status from typing Enter in an interactive startstop session, or by running the 'status' command, or by looking at UNIX's process list (with ps) or by looking at Windows Task Manager with display of Process ID activated. 
     58 
     59 
     60 
    3961 
    4062=== reconfigure === 
    4163Allows adding new modules or rings to a running Earthworm.  
    4264 
    43  * Startstop will re-read the startstop_nt.d, starstop_unix.d or startstop_sol.d, and allocate any new rings and start up any new modules it finds in the new .d file. In the process it rereads the earthworm.d and earthworm_global.d, in the event that there have been new module IDs or new ring IDs added there. 
    44  * As the final reconfigure step, statmgr is restarted as well so it re-reads it's config file. Any modules that were added to startstop*d should be added to the statmgr.d config file as well. 
    45  * The command line version does the same thing. 
    46  * Within startstop, this can be abbreviated to just "recon". 
     65Reconfigure is invoked from within startstop or from the command line (provided you have the earthworm environment variables set from the appropriate script in the environment directory) by typing: 
     66{{{ 
     67reconfigure 
     68}}} 
     69OR  
     70{{{ 
     71recon 
     72}}} 
     73 
     74 * The reconfigure program sends an Earthworm TYPE_RECONFIGURE message. Startstop will then re-read the startstop_nt.d, starstop_unix.d or startstop_sol.d, and allocate any new rings and start up any new modules it finds in the new .d file. In the process it rereads the earthworm.d and earthworm_global.d, in the event that there have been new module IDs or new ring IDs added there. 
     75 * As the final reconfigure step, [wiki:startmgr statmgr] is restarted as well so it re-reads it's config file. Any modules that were added to startstop*.d should be added to the statmgr.d config file as well. 
     76 * Reconfigure is a command you can run from within startstop, and it also is a standalone command-line tool. The standalone tool will show you a 'status' before and after the reconfigure.rererec 
     77 * Note that modules that are already running will not be restarted and should not be affected. 
    4778 
    4879=== restart === 
    4980Allows manual restarting of individual modules. 
     81 
     82Restart is invoked with the command: 
    5083{{{ 
    5184restart <pid> or restart <module name> 
    5285}}} 
    5386 
    54  * Startstop will send the module a message to exit, and may try and kill it if it doesn't quit by itself in a certain period of time. Next startstop  will attempt to start the process back up. 
     87 * The restart program sends an Earthworm TYPE_RESTART message with the specified pid(s) to startstop, for manual restarting of individual modules. The pid can be obtained from the status message printed by status. Startstop will then send the module a message to exit, and may try and kill it if it doesn't quit by itself in a certain period of time. Next startstop  will attempt to start the process back up. 
    5588 * Note that the <module name> must be unique for this to work as an argument. The command line version can only accept the pid (Process Id) as an argument. 
     89 * The module writes the TYPE_RESTART for each pid provided into the first ring created by startstop. For this reason, the startstop file must be named as per OS naming conventions, or passed in as the second argument after a -c flag is given.  
    5690 
    5791=== !StartstopConsole === 
     
    68102=== stopmodule === 
    69103Given an Earthworm module process ID, stopmodule stops it, and startstop marks it as "Stop" to prevent [wiki:statmgr statmgr] from restarting it. 
     104 
     105From the command line or within startstop: 
    70106{{{ 
    71107stopmodule <pid> or stopmodule <module name> 
    72108}}} 
    73  
    74  * Startstop will send the module a message to exit, and may try and kill it if it doesn't quit by itself in a certain period of time. Startstop will not try to start the process back up, and statmgr shouldn't try to restart it either. 
    75  * Note that the <module name> must be unique for this to work as an argument. The command line version can only accept the pid (Process Id) as an argument. 
    76  * Within startstop, this can be abbreviated to just "stop <pid> or stop <module name>". 
     109Also within startstop: 
     110{{{ 
     111stop <pid> or stop <module name> 
     112}}} 
     113Use 'status' to find the PID for your module if you don't know it. 
     114 
     115 * The stopmodule attaches to earthworm's first shared memory ring (first listed in starstop*d) and sends a TYPE_STOP message with a payload of the PID. This is intended to signal that processid to terminate gracefully. 
     116 * Startstop sees the TYPE_STOP message and will 1) request the module shut itself down gracefully; that failing it will 2) hard kill the module. Startstop will mark this module as "Stop" after it has confirmed the process is dead. Startstop will not try to start the process back up, and statmgr shouldn't try to restart it either. 
     117 * [wiki:statmgr statmgr] sees a TYPE_STOP message and sets a it's internal restart status for that module to STOPPED. Until statmgr sees a TYPE_RESTART message for a stopped module, it should not request a restart of the module. 
     118 * Stopmodule needs the process id (PID) of the module it's attempting to stop. You can find out the process id by getting the status from typing Enter in an interactive startstop session, or by running the 'status' command, or by looking at UNIX's process list (with ps) or by looking at Windows Task Manager with display of Process ID activated. 
     119 * Note that the <module name> must be unique for this to work as an argument. The command line version can only accept the pid as an argument. 
     120 * If startstop is quit, and restarted (Earthworm shut down completely and then started), and you didn't manually remove the module you stopped from the startstop*.d, the previously stopped module WILL start up in the new session. 
    77121 * The command-line "stopmodule" should mark the module as intentionally stopped, showing up as "Stop" in the status listing. This differes from the command line tool "pidpau" which will simply kill a module. It won't be marked as "Stop" so if statmgr is set to monitor and restart this particular module a process killed by "pidpau" will get started back up again. A module stopped by "stopmodule" should not. 
    78122 * The module is stopped only for the duration that this startstop session is running! If you want to permanently stop a module, you'll also want to remove it from the startstop*d, and the statmgr.d files so it doesn't get started up next time around. 
     123 * Warning: On Solaris there's a shell command called "stop". If you accidentally type "stop <pid>" instead of "stopmodule <pid>", Solaris won't be able to stop or restart the module in question. The solution: in a unix command prompt, "kill <pid>", then "restart <pid>", then finally "stopmodule <newpid>" 
    79124 
    80125== Solaris, Linux, Mac OS X versions ==