- Added tabledrive: table driven path for MARS

- 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
This commit is contained in:
koennecke
2005-07-22 14:56:18 +00:00
parent d96fb7377d
commit 76abbe1042
39 changed files with 1822 additions and 672 deletions

View File

@ -3,7 +3,7 @@
<TITLE>SICS Setup</TITLE>
</HEAD>
<BODY>
<H1>SICS programs, Scripts and Prerequisites<h1>
<H1>SICS programs, Scripts and Prerequisites</h1>
<p>
<h2>Hardware</h2>
The following hardware is usually present for any SICs instrument:
@ -17,7 +17,8 @@ The following hardware is usually present for any SICs instrument:
</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 onboard computers running the VXworks realtime
memories are 68000 VME or MEN-A12 onboard computers
running the VXworks realtime
operating system and some home grown histogramming software documented
elsewhere.
</p>
@ -31,10 +32,10 @@ required:
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.
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 knwon source of documentation about this
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
@ -51,28 +52,6 @@ Additionally a client program is needed which connects to the
instrument control server and provides a user interface to it.
</p>
<h2>Scripts</h2>
<p>
To get all this software up and running a couple of shell scripts have
been provided:
<dl>
<dt>startsics
<dd> This script starts all the necessary server programs for driving
the instrument.
<dt>killsics
<dd>This script shuts down all instrument control servers properly.
<dt>keepalice, keepaliveserp
<dd>The server programs are automatically restarted when they
die. This is done through these scripts. keepaliveserp is a special
script for the serial port server.
<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>
<H1>General SICS Setup</H1>
<P>
@ -90,9 +69,10 @@ 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 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.
<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
@ -110,81 +90,107 @@ initialization file.
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> sim
<DD> 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.
<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>
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 <b>
source /data/lnslib/bin/lns.login</b> into her .login file.
All commands listed in this section have to issued with the privilege of the
instrument user account.
</p>
<h2> SICS Installation</h2>
<p>
All executables and files necessary to run SICS for each instrument is
avaialable under the /data/lnslib/distribution/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 <b>sicsinstall</b> 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:
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>dev
<DD>copies knew executables from the development area to the distribution
directory. This command is meant to be used by computing staff only.
<DT>devfull
<DD>as dev, but copies all files. This command is meant to be used by computing staff only.
<DT>dmc
<DD>copies all files necessary for the instrument DMC.
<DT>topsi
<DD>copies all files necessary for the instrument TOPSI.
<DT>sans
<DD>copies all files necessary for the instrument SANS.
<DT>hrpt
<DD>copies all files necessary for the instrument HRPT.
<DT>amor
<DD>copies all files necessary for the instrument AMOR
<DT>focus
<DD>copies all files necessary for the instrument FOCUS
<DT>tasp
<DD>copies all files necessary for the instrument TASP
<DT>druechal
<DD>copies all files necessary for the instrument DRUECHAL
<DT>trics
<DD>copies all files necessary for the instrument TRICS
<DT>save inst
<DD>copies all the instrument configuration files from the instrument
account back to to the distribution area. Replace inst with the name
of the instrument in lower case. This call is necessary to save
modified instrument configurations.
<DT>doc
<DD>updates only the documentation on your disk.
<DT>exe
<DD>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.
</dl>
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.
<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>