
- Initial MARS development - Upgraded Manager Manual SKIPPED: psi/make_gen psi/psi.c psi/tabledrive.c psi/tabledrive.h psi/tabledrive.w psi/utils/SerPortServer.c
197 lines
7.8 KiB
HTML
197 lines
7.8 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>SICS Setup</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>SICS programs, Scripts and Prerequisites</h1>
|
|
<p>
|
|
<h2>Hardware</h2>
|
|
The following hardware is usually present for any SICs instrument:
|
|
<ul>
|
|
<li>An instrument computer
|
|
<li>A Lantronix terminal server with 8-16 serial ports for connecting:
|
|
<li>Motor controllers
|
|
<li>Counter boxes
|
|
<li>Temperature controllers.
|
|
<li>Optionally 1-n histogram memory computers are present.
|
|
</ul>
|
|
The terminal server software is provided by Lantronix, see the
|
|
appropriate manuals for the device for a description. The histogram
|
|
memories are 68000 VME or MEN-A12 onboard computers
|
|
running the VXworks realtime
|
|
operating system and some home grown histogramming software documented
|
|
elsewhere.
|
|
</p>
|
|
<h2>Server programs</h2>
|
|
<p>
|
|
For proper operation of an instrument the following software components are
|
|
required:
|
|
<dl>
|
|
<dt>SerPortServer
|
|
<dd>This is a TCP/IP server which implements a special protocoll for
|
|
communicating with serial ports. The actual communication with the
|
|
serial ports is done through the Lantronix terminal server. Both the
|
|
serial port protocoll and the SerPortServer are only documented in the
|
|
source code. The SerPortServer program is on its way out.
|
|
<dt>TecsServer
|
|
<dd>This is a TCP/IP server which watches over temperature
|
|
controllers. The only known source of documentation about this
|
|
software is Markus Zolliker.
|
|
<dt>FileSync
|
|
<dd>This is a little UDP server which waits for UDP messages from the
|
|
instrument control program. Then the server starts a script which
|
|
synchronizes the local data directory with the central data storage on
|
|
the labarotory server. FileSync is configured through an
|
|
initialization file usually called fs.ini. See the comments in the
|
|
initialization file for more information.
|
|
<dt>SICServer
|
|
<dd>This is the actual instrument control server. The configuration of
|
|
this program is documented in this manual.
|
|
</dl>
|
|
Additionally a client program is needed which connects to the
|
|
instrument control server and provides a user interface to it.
|
|
</p>
|
|
|
|
|
|
<H1>General SICS Setup</H1>
|
|
<P>
|
|
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.
|
|
</P>
|
|
<p>
|
|
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:
|
|
<DL>
|
|
<DT>bin
|
|
<DD> The directory where some executables live.
|
|
<dt>inst_sics
|
|
<dd>All instrument configuration files and the SICServer live in
|
|
this directory. Replace inst by the name of the instrument as appropriate.
|
|
<DT>data
|
|
<DD>The data directory is the central place where all data files collected
|
|
at the instrument are stored. This directory contains subdirectories
|
|
for each year. These directories hold the data collected at the
|
|
instrument in this year plus a file named
|
|
DataNumber which keeps the current serial number of the data files. This
|
|
file should never be edited. At the start of each year the instruement manager
|
|
must create a new directory with an empty DataNumber
|
|
file. Additionally the
|
|
path variables both for the data file directory and the DataNumber
|
|
file have to be set to the new directory in the instrument
|
|
initialization file.
|
|
<DT>log
|
|
<DD> 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.
|
|
<dt>lib
|
|
<dd>Contains some files needed for running SICS clients locally.
|
|
<DT> doc
|
|
<DD> 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.
|
|
<DT>motor
|
|
<DD>This directory holds a script for reading and restoring the motor
|
|
parameter from the EL734 motor controllers. And the motor parameters
|
|
stored in parameter files. It is the instrument scientists
|
|
responsability to save the motor parameters after changes to the
|
|
configuration of the instrument.
|
|
<DT>tmp
|
|
<DD> A directory for temporary and PID files.
|
|
<DT>help
|
|
<DD>A directory for help files for the help system.
|
|
</DL>
|
|
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.
|
|
</p>
|
|
|
|
<h2>System Control</h2>
|
|
<p>
|
|
All commands listed in this section have to issued with the privilege of the
|
|
instrument user account.
|
|
</p>
|
|
<p>
|
|
In order to watch over all these servers, the <a
|
|
href="http://www.tildeslash.com/monit">monit</a> software is used. This is
|
|
a program which watches server processes and restarts them as necessary.
|
|
Monit can also be used to watch over hardware and the file system. Monit
|
|
writes a log file and can trigger e-mail alerts on certain
|
|
problematic conditions.
|
|
</p>
|
|
<p>
|
|
Monit itself is controlled through a configuration file, .monitrc, which lives
|
|
in the instrument accounts home directory. Monit also uses another Tcl program runwithpid which is responsible for starting and stopping server programs.
|
|
In order to configure all this, there is another program: makemonit which
|
|
creates the monit configuration file and copies and edits the runwithpid
|
|
program. The syntax of makemonit is:
|
|
<dl>
|
|
<dt>makemonit instrument terminalserver data-mount-point hm1 hm2 ..
|
|
<dd>instrument is the instrument name in lowercase, terminalserver is the
|
|
name of the terminal server used for serial port access, data-mount-point is
|
|
the name of file system onto which the instruments data is written. This is
|
|
followed by a list of all the histogram memory computers used by the
|
|
instrument.
|
|
<dt>monitinit
|
|
<dd>monitinit is an alias which calls makemonit with all required parameters
|
|
for a given instrument in standard configuration.
|
|
</dl>
|
|
</p>
|
|
<p>
|
|
Monit itself can be controlled with the following commands:
|
|
<dl>
|
|
<dt>monit
|
|
<dd>Starts the monit daemon and all configured processes. This is only
|
|
necessary after a reboot of the system.
|
|
<dt>monit status
|
|
<dd>This shows a status message listing the status of all configured servers
|
|
and the checked hardware. The monit status is also available on the WWW from
|
|
http://lns00.psi.ch/monit/instrument. Replace instrument with the appropriate
|
|
instrument name.
|
|
<dt>monit stop target
|
|
<dd>Stops the server process target. The following targest exist:
|
|
<dl>
|
|
<dt>all
|
|
<dd>All processes
|
|
<dt>sicsserver
|
|
<dd>The SICS server
|
|
<dt>SerPortServer
|
|
<dd>The serial port server.
|
|
<dt>sync
|
|
<dd>The file synchronisation server.
|
|
<dt>tecs
|
|
<dd>The TecsServer for controlling environment devices.
|
|
<dt>simserver
|
|
<dd>A simulation server(not on all instruments).
|
|
</dl>
|
|
<dt>monit start target
|
|
<dd>Starts a server process, targest are the same as described above.
|
|
<dt>monit restart target
|
|
<dd>Stops and starts the process target. Targets are as listed above.
|
|
<dt>monit quit
|
|
<dd>Stops monit alltogether. Please note, that servers stay running with
|
|
this command. In order to sop everything the sequence: monit stop all;
|
|
monit quit is required.
|
|
<dt>startsics
|
|
<dd> This script starts all the necessary server programs for driving
|
|
the instrument through monit.
|
|
<dt>killsics
|
|
<dd>This script shuts down all instrument control servers properly through
|
|
monit.
|
|
<dt>instsync
|
|
<dd>replace inst by the name of the instrument in lower case. This
|
|
script is invoked by the FileSync server and is responsible for
|
|
synchronizing the local data store with the one on the labaratory
|
|
server. This is usally done by calling the unix program rsync with
|
|
appropriate parameters.
|
|
</dl>
|
|
</p>
|
|
</BODY>
|
|
</HTML>
|