Daylight Summer School 2000, June 7-9, Santa Fe, NM

Daylight Worksheet - Starting and killing the servers --WITH HINTS

There are two Daylight database servers, Thorserver and Merlinserver. They must run continually to provide access to databases to users via client programs. They may be started and killed directly by the Daylight administrator, or via scripts, or automatically at boot/shutdown.

Starting and killing servers manually:

  1. Log in as the Daylight administrator, the owner of the databases. If your Daylight environment is ok, $DY_ROOT is defined and $DY_ROOT/bin is in your path. Then just enter:

    thorserver &
    merlinserver &

  2. Check the log files for errors. If the environment variables $DY_THOR_LOG_FILE and $DY_MERLIN_LOG_FILE are not set, these files will be in /tmp.

  3. Test the servers by accessing databases via client software.

    % thorls
      acd972demo
      chemreact97demo
      maybridge99demo
      medchem99demo
      wdi991demo
    % thordbping wdi991demo
    Enter server access password for origin:thor:mug >> 
    Enter password for database wdi991@origin:thor:* >> 
        NOTE: World Drug Index 1999 Version 1
        NOTE: 
        NOTE: COPYRIGHT [C] 1999 DERWENT INFORMATION LTD.
    
    Opened "/nalgas/thordb/wdi991demo.THOR@origin:thor" with permission "r".
      
    % thorlist wdi991demo | more
    

  4. Determine the process IDs for each process from the log files. (Another way is to use the ps command.)

    % ps -ef | grep serv
        root   115     1  0   Mar 05 ?        0:00 /usr/sbin/keyserv
        root   126     1  0   Mar 05 ?       44:27 /usr/lib/netsvc/yp/ypserv -d
          jj  6680  6663  0   Jun 03 pts/4    0:00 /bin/sh -c tail -f /daylight/merlinserver.log
        thor 10123     1  0   Mar 31 ?       1845:58 /daylight/day462/v462/jre/jre1.1.6/bin/sparc/green_threads/jre daylight.service
    j   thor 19961     1  0   Mar 23 ?        0:11 /daylight/day462/v462/bin/merlinserver medchem97demo
        thor 19959     1  0   Mar 23 ?        0:57 /daylight/day462/v462/bin/thorserver
        thor 19964     1  0   Mar 23 ?        0:00 /daylight/day462/v462/bin/merlinsmartstalk -n 1 -f /daylight/merlinserver.log
          jj 17699  6700  0 13:58:43 pts/11   0:00 grep -i serv
        root  7573   324  0   Mar 09 ?        0:03 /usr/dt/bin/rpc.ttdbserverd
          jj  6676  6664  0   Jun 03 pts/5    0:00 /bin/sh -c tail -f /daylight/thorserver.log
          jj  6687  6680  0   Jun 03 pts/4    0:00 tail -f /daylight/merlinserver.log
          jj  6683  6676  0   Jun 03 pts/5    0:00 tail -f /daylight/thorserver.log
    

  5. Kill the servers with:

    kill <thorpid>
    kill <merlinpid>

    % kill 19961
    % kill 19959
    
Starting and killing servers using a script:
  1. By using a script, we can start the Thorserver and Merlinserver with one command, ensure that the correct Daylight environment is used, and load databases. The script START_DCIS_SERVERS is provided for this purpose. Edit the script to ensure that local directories and databases are specified correctly, and invoke it.

    START_DCIS_SERVERS

  2. The KILL_DCIS_SERVERS script assures that databases are closed and users evicted before killing the servers. Since it is possible for a database to be corrupted by killing the Thorserver when a database is opened-writeable, this is a key feature.

    KILL_DCIS_SERVERS

Starting/killing servers automatically at boot/shutdown:
  1. Simple instructions are provided in the scripts for invoking them at boot and shutdown.

Daylight Chemical Information Systems Inc.
support@daylight.com