- Updated Makefiles
- Moved TAS code to psi - Updated programmers documentation SKIPPED: psi/make_gen psi/nextrics.c psi/t_conv.c psi/t_conv.f psi/t_rlp.c psi/t_rlp.f psi/t_update.c psi/t_update.f psi/hardsup/el734_utility.c psi/hardsup/makefile_alpha
This commit is contained in:
@@ -3,7 +3,7 @@ In this chapter the facilities of the SICS servers kernel will be examined
|
||||
more closely. All the kernel modules and their function will be listed,
|
||||
together with some explanatory information and an overview about the
|
||||
application programmers interfaces (API) provided. This section should
|
||||
answer the questions: WHat is available?, Where to find what?,
|
||||
answer the questions: What is available?, Where to find what?,
|
||||
Why did they do that? Details of
|
||||
the API's mentioned are given in the reference section.
|
||||
|
||||
@@ -124,7 +124,7 @@ The network reader currently supports four types of sockets:
|
||||
\item User sockets.
|
||||
\end{itemize}
|
||||
|
||||
The accept type of socket is the main server port where clients try to
|
||||
The accept type of socket is the main server port to which clients try to
|
||||
connect to. The network reader accepts the connection and tries to read a
|
||||
username/password pair for a specified amount of time.
|
||||
If the username/password is valid, the connection will be accepted,
|
||||
@@ -175,16 +175,18 @@ mechanism. For more details see John Ousterhout's book.
|
||||
In an earlier stage it was considered to use the Tcl interpreter as the SICS
|
||||
interpreter. This idea was discarded for some reasons: One was the
|
||||
difficulty of transporting the client execution context (i.e. the connection
|
||||
object) through the Tcl interpreter. There is no standard Tcl mechanism for
|
||||
doing that. The second was security: the Tcl
|
||||
interpreter is very powerful and can be abused. It was felt that the system
|
||||
had to be protected against such problems. The third reasons was that the
|
||||
set of user commands should not be cluttered with Tcl commands in order to
|
||||
prevent confusion. Programming macros is anyway something which is done by
|
||||
SICS managers or programmers. However, the SICS interpreter is still modeled
|
||||
very much like the Tcl-interpreter. A Tcl interpreter is still included in
|
||||
order to provide a full featured macro language. The SICS interpreter and the
|
||||
Tcl macro interpreter are still tightly coupled.
|
||||
object) through the Tcl interpreter. This reason has become invalid
|
||||
now, with the advent of Tcl 8.+ which supports namespaces. The second
|
||||
was security: the Tcl interpreter is very powerful and can be
|
||||
abused. It was felt that the system had to be protected against such
|
||||
problems. The third reasons was that the set of user commands should
|
||||
not be cluttered with Tcl commands in order to prevent
|
||||
confusion. Programming macros is anyway something which is done by
|
||||
SICS managers or programmers. However, the SICS interpreter is still
|
||||
modeled very much like the Tcl-interpreter. A Tcl interpreter is
|
||||
still included in order to provide a full featured macro
|
||||
language. The SICS interpreter and the Tcl macro interpreter are
|
||||
still tightly coupled.
|
||||
|
||||
The SICS interpreter must forward commands to the SICS objects. For this the
|
||||
interpreter needs some help from the objects themselves. Each SICS object
|
||||
@@ -290,26 +292,6 @@ important SICS components: the interpreter, the task switcher, the device
|
||||
executor, the environment monitor and the network reader. This module also
|
||||
contains the code for initializing, running and stopping the server.
|
||||
|
||||
\section{The ServerLog}
|
||||
As part of the SICS kernel there exists a global server log file. This file
|
||||
contains:
|
||||
\begin{itemize}
|
||||
\item All traffic on all client connections. Even messages suppressed by the
|
||||
clients.
|
||||
\item All internal error messages.
|
||||
\item Notifications about important internal status changes.
|
||||
\end{itemize}
|
||||
This server log is meant as an aid in debugging the server. As the SICS
|
||||
server may run for days, weeks and months uninterrupted this log file may
|
||||
become very large. However, only the last thousand or so messages are really
|
||||
of interest when tracking a problem. Therefore a scheme is implemented to
|
||||
limit the disk space used by the server log. The server log writes
|
||||
cyclically into a number of files. A count of the lines is kept which were
|
||||
written to each file. Above a predefined count, a new file is started.
|
||||
As an interface the server log provides a function which allows to write
|
||||
a message to it. This can be used by any object in the system for
|
||||
interesting messages. The number of files to cycle through and the length of
|
||||
each file can be configured by defines at the top of servlog.c.
|
||||
|
||||
\section{The Performance Monitor}
|
||||
This facility provides the data for the Performance (see user documentation)
|
||||
@@ -351,5 +333,57 @@ users. If this becomes a serious concern, this module has to be rewritten.
|
||||
\section{The Server Main Function}
|
||||
This does not do much, just initialize the server, run it, and stop it.
|
||||
|
||||
|
||||
|
||||
\section{Logging}
|
||||
The SICS server offers multiple options for logging:
|
||||
\begin{itemize}
|
||||
\item There is a cyclical server log logging all traffic. This is
|
||||
described below.
|
||||
\item Per client connection log files can be configured. This is part
|
||||
of the connection object interface.
|
||||
\item A special module, the commandlog exists, which saves all traffic
|
||||
issued on client connections with user or manager privilege. This is
|
||||
the most useful log for finding problems. This facility can be
|
||||
configured to create a log file per day. Or the user can demand to
|
||||
have her very own log file.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsection{The ServerLog}
|
||||
As part of the SICS kernel there exists a global server log file. This file
|
||||
contains:
|
||||
\begin{itemize}
|
||||
\item All traffic on all client connections. Even messages suppressed by the
|
||||
clients.
|
||||
\item All internal error messages.
|
||||
\item Notifications about important internal status changes.
|
||||
\end{itemize}
|
||||
This server log is meant as an aid in debugging the server. As the SICS
|
||||
server may run for days, weeks and months uninterrupted this log file may
|
||||
become very large. However, only the last thousand or so messages are really
|
||||
of interest when tracking a problem. Therefore a scheme is implemented to
|
||||
limit the disk space used by the server log. The server log writes
|
||||
cyclically into a number of files. A count of the lines is kept which were
|
||||
written to each file. Above a predefined count, a new file is started.
|
||||
As an interface the server log provides a function which allows to write
|
||||
a message to it. This can be used by any object in the system for
|
||||
interesting messages. The number of files to cycle through and the length of
|
||||
each file can be configured by defines at the top of servlog.c.
|
||||
|
||||
|
||||
\section{Instrument Status Persistence}
|
||||
Real programs do dump core (the SICS server is good, but is no
|
||||
exception in this respect) and real computers fall over. In such cases
|
||||
it would be useful if instrument configuration parameters such as
|
||||
zero points , variable settings etc. are not lost. SICS achieves this
|
||||
by writing a status file each time a parameter changes. This
|
||||
status file is read back whenever the SICS server starts. The default
|
||||
status file is configured in the instrument startup file as the SicsOption
|
||||
statusfile. The user
|
||||
can also request a status file to be written or recovered manually.
|
||||
The status file is just a file with SICS commands which configure
|
||||
relevant parameters. The actual writing of these commands is delegated
|
||||
to each SICS object. Each SICS object which whishes to save data into
|
||||
the status file has to implement a function which will
|
||||
automatically be called when a status file is written. For details,
|
||||
consult the chapter on SICS object implementation.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user