# General SICS Setup

SICS is a client server system. This implies that there is a server program which implements all the functionlity and client programs which implement the user interface. The client program is the only thing the user is intended to see. This also means that the location of the client programs is quite independent from the computer where the server runs. In the following the layout of a server installation is described as established at SINQ.

For each instrument there is a data aquisition computer. On this computer there exists a user name and consequently a home directory for the instrument. In the following text this instrument root directory will be called sicsroot. This root directory has the following subdirectories:

bin
  The bin directory is the place where the actual executable for the SICS server is kept along with local copies of all necessary clients, the server initialisation files and special macro files defined for the instrument.
data
  The data directory is the central place where all data files collected at the instrument are stored. Additionally this directory holds a file named DataNumber which keeps the current serial number of the data files. This file should never be edited. However, on the first of january an instrument manager should reset the serial number in this file to 0.
log
  The log directory contains the server log files and the automatically generated client log files. Any now and then, and especially when disk space problems loom, the client*.log files should be deleted by the instrument manager.
doc
  This directory holds a copy of the SICS user documentation for the instrument. These are html files which can be viewed with WWW-browsers such as lynx or netscape.
sim
  The sim directory is meant to hold all files necessary for a SICServer initialised for the instrument but configured with simulated hardware. This facility is meant for testing of command files.

Besides these directories there should be nothing on the instrument account. All evaluated data, personal command files etc. should be held on the normal user account of the instrument user.

For this purpose the /data/lnslib/bin directory holds copies of the apropriate command line and status display clients for each instrument. A user can make this directory (and much more) available by including the line source /data/lnslib/bin/lns.login into her .login file.

## SICS Installation

All executables and files necessary to run SICS for each instrument is avaialable under the /data/lnslib/src/sics hierarchy. The bin directory holds general executable files and a directory for each instrument which holds instrument specific files. SICS installation on a unix system is greatly simplified by using the sicsinstall korn shell script. This script is available to each user. sicsinstall can be invoked simply by typing sicsinstall at the command prompt. sicsinstall needs a subcommand in order to know what it is expected to do:

dev
  copies knew executables from the development area to the distribution directory. This command is meant to be used by computing staff only.
devfull
  as dev, but copies all files. This command is meant to be used by computing staff only.
dmc
  copies all files necessary for the instrument DMC.
topsi
  copies all files necessary for the instrument TOPSI.
sans
  copies all files necessary for the instrument SANS.
doc
  updates only the documentation on your disk.
exe
  copies only new executable files from the distribution area. This is the recommended option when you want to be sure, that you have the latest version of SICS before reporting a bug.

Most of these options require you to be in the home directory of the instrument account. sicsinstall checks for this and warns you if this is not the case. Directory structures are checked for and created as needed.