Changes between Version 1 and Version 2 of startstop_sol


Ignore:
Timestamp:
11/15/11 17:21:50 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • startstop_sol

    v1 v2  
    77 
    88== Details == 
     9Startstop is a system-specific module; the configuration file described here is for the Solaris version. On startup, startstop changes to the directory specified by the EW_PARAMS environment variable. Then it reads the configuration file named startstop_sol.d. This file sets up all parameters required to run an Earthworm system. In the configuration file, lines may begin with a valid startstop command (listed below) or with a # to denote a comment. Command names must be typed in the configuration file exactly as shown in this document (upper/lower case matters!). 
     10 
     11=== Example startstop_sol.d Configuration File === 
     12 
     13{{{ 
     14# 
     15#       Startstop (Solaris Version) Configuration File 
     16# 
     17#    <nRing> is the number of transport rings to create. 
     18#    <Ring> specifies the name of a ring followed by it's size 
     19#    in kilobytes, eg        Ring    WAVE_RING 1024 
     20#    The maximum size of a ring is 1024 kilobytes. 
     21#    Ring names are listed in file earthworm.h. 
     22# 
     23 nRing               3 
     24 Ring   WAVE_RING 1024 
     25 Ring   PICK_RING 1024 
     26 Ring   HYPO_RING 1024 
     27# 
     28 MyModuleId    MOD_STARTSTOP  # Module Id for this program 
     29 HeartbeatInt  50             # Heartbeat interval in seconds 
     30 MyClassName   TS             # For this program 
     31 MyPriority     0             # For this program 
     32 LogFile        1             # 1=write a log file to disk, 0=don't 
     33 KillDelay      5             # seconds to wait before killing modules on 
     34                              #  shutdown 
     35 HardKillDelay  5             # seconds to wait after SIGKILL 
     36                              #   if absert, no SIGKILL is sent 
     37# maxStatusLineLen 120         # Uncomment to specify length of lines in status 
     38 Stderr         None          # Where to send stderr messages: None, Console or File 
     39# 
     40#    Class must be RT or TS 
     41#    RT priorities from 0 to 59 
     42#    TS priorities le 0 
     43# 
     44#    If the command string required to start a process contains 
     45#    embedded blanks, it must be enclosed in double-quotes. 
     46#    Processes may be disabled by commenting them out. 
     47#    To comment out a line, preceed the line by #. 
     48#    The optional Agent command lists the user and group names under which 
     49#       the command will be run. Make sure they are valid names! 
     50#       You cannot use "root" as the Agent user. If an earthworm module 
     51#       needs to run as root, you should make that module's binary setuid root. 
     52# 
     53 Process          "pick_ew pick_ew.d" 
     54 Class/Priority    TS 0 
     55 Agent             "eworm" "net" 
     56# 
     57# Process          "coaxtoring coaxtoring.d" 
     58# Class/Priority    RT 10 
     59# 
     60# Process          "export_generic export_picks.d" 
     61# Class/Priority    TS 0 
     62# 
     63 Process          "binder_ew binder_ew.d" 
     64 Class/Priority    TS 0 
     65 Stderr            File 
     66# 
     67# 
     68 Process          "eqproc eqproc.d" 
     69 Class/Priority    TS 0 
     70 Stderr            Console 
     71# 
     72 Process          "diskmgr diskmgr.d" 
     73 Class/Priority    TS 0 
     74# 
     75 Process          "pagerfeeder pagerfeeder.d" 
     76 Class/Priority    TS 0 
     77# 
     78 Process          "statmgr statmgr.d" 
     79 Class/Priority    TS 0 
     80# 
     81# Process          "eqalarm_ew eqalarm_ew.d" 
     82# Class/Priority    TS 0 
     83# 
     84 Process          "copystatus WAVE_RING HYPO_RING" 
     85 Class/Priority    RT 5 
     86# 
     87 Process          "copystatus PICK_RING HYPO_RING" 
     88 Class/Priority    RT 5 
     89# 
     90 Process          "menlo_report menlo_report.d" 
     91 Class/Priority    TS 0 
     92# 
     93}}} 
     94 
     95=== Functional Commands === 
     96Unlike most other Earthworm modules, startstop expects the lines in its control file to be in a certain order. Below are the commands recognized by startstop, grouped by the function they influence and listed in the order in which they must appear in the control file. All commands are required! 
     97 
     98==== Shared memory setup ==== 
     99nRing                   required 
     100Ring                    required (nRing) 
     101 
     102===== nRing ===== 
     103nRing nRing 
     104 
     105Specifies the number of shared memory regions (aka transport rings) that startstop will create for "public" use by the modules of this Earthworm system. nRing should be an integer from 1 to MAX_RING (currently defined to be 50). 
     106 
     107Example:  nRing 3 
     108 
     109===== Ring ===== 
     110Ring name size 
     111 
     112Specifies the name and size, in kilobytes, of one transport ring. There must be exactly nRing "Ring" commands following the "nRing" command in the startstop_sol.d. name is a character string (up to 19 characters long, valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique number for the key to the shared memory region. size should be an integer between 1 and 1024 (the default maximum size). When deciding how large to make a memory region, realize that the transport layer uses a portion of the memory region for its own bookkeeping. The region size is NOT required to be an even multiple of the size of the messages it will contain. However, suppose you want the region to be exactly large enough to store NUM messages of size MSGSIZE. To include space for transport bookkeeping too, the region size (in bytes) should be: 
     113sizeof(SHM_HEAD) + NUM * ( sizeof(TPORT_HEAD) + MSGSIZE ) 
     114 
     115where SHM_HEAD and TPORT_HEAD are structures defined in transport.h. Startstop places all of its outgoing messages in the memory region specified by the first "Ring" command. 
     116 
     117Example:  Ring  WAVE_RING 1024 
     118 
     119==== Startstop-specific info ==== 
     120MyModuleId              required 
     121HeartbeatInt            required 
     122MyClassName             required 
     123MyPriority              required 
     124LogFile                 required 
     125KillDelay               required 
     126HardKillDelay           optional 
     127maxStatusLineLen        optional 
     128Stderr                  optional 
     129 
     130===== MyModuleId ===== 
     131MyModuleId mod_id 
     132 
     133Sets the module id for labeling all outgoing messages. mod_id is a character string (up to 30 characters, valid strings listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number.     Startstop places its outgoing messages on the shared memory ring specified by the first "Ring" command in startstop_sol.d. 
     134 
     135Example:  MyModuleId MOD_STARTSTOP 
     136 
     137===== HeartbeatInt ===== 
     138HeartbeatInt nsec 
     139 
     140Defines the number of seconds, nsec, between TYPE_HEARTBEAT messages issued by startstop. Startstop places its heartbeats on the shared memory ring specified by the first "Ring" command in startstop_sol.d. 
     141 
     142Example:  HeartbeatInt 30 
     143 
     144===== MyClassName ===== 
     145MyClassName class 
     146 
     147Sets the process class for startstop. class is a character string that must be set to either "RT" (for Real-Time) or "TS" (for Time- Share) on solaris. 
     148 
     149Example:  MyClassName RT 
     150 
     151===== MyPriority ===== 
     152MyPriority priority 
     153 
     154Sets the process priority for startstop. See the "Class/Priority" command below for allowed values. After startstop reads its configuration file, it changes its own class/priority to the values specified in the "MyClassName" and "MyPriority" commands. 
     155 
     156Example:  MyPriority 4 
     157 
     158===== LogFile ===== 
     159LogFile switch 
     160 
     161Sets the on-off switch for writing a log file to disk. If switch is 0, no log file will be written. If switch is 1, startstop will write a daily log file(s) called cfname_yyyymmdd.log where cfname is the name (without extension) of startstop's configuration file (ex: startstop_sol) and yyyymmdd is the current UTC date (ex: 19960123) on the system clock. The file(s) will be written in the EW_LOG directory (environment variable). 
     162 
     163Example:  LogFile 1 
     164 
     165===== KillDelay ===== 
     166===== HardKillDelay ===== 
     167===== maxStatusLineLen ===== 
     168===== Stderr ===== 
     169 
     170==== Earthworm modules to run ==== 
     171Process                 required \ 
     172Class/Priority          required  |  one set 
     173Stderr                  optional  | per module 
     174Agent                   optional / 
     175 
     176===== Process ===== 
     177===== Class/Priority ===== 
     178===== Stderr ===== 
     179 
     180(see above) 
     181 
     182===== Agent ===== 
    9183 
    10184== Helpful Hints ==