Next: The Clamshell Daemon: clamd
Up: The Daemons
Previous: The Daemons
  Contents
  Index
The ROTSE Daemon: rotsed
The ROTSE Daemon (rotsed) is the central nervous system of the ROTSE daq
system, as shown in Figure 1.1. rotsed controls system
startup and shutdown and handles interdaemon communication. It also handles
emergency responses to bad weather and outputs system status for the web based
status monitor (See Section 8.4.2).
The ROTSE IPCS shared memory structure is divided into several structures, one for
each daemon. Each daemon has a status structure used to report status to
rotsed, and a command structure, to receive commands from rotsed. On each loop, rotsed reads the status of each daemon to ensure
that they are all running smoothly. If a daemon has not updated its timestamp
recently, rotsed shuts down the system. If a status structure from one
daemon contains information for another daemon, rotsed copies the relevant information to
the command structure of the destination daemon.
When the weather turns bad, rotsed is responsible for issuing an
immediate command to close the clamshell. It must be noted that the weather
monitor daemon, weathd, must be turned on in order for this to work.
While shared memory commands are used to communicate between two daemons at a
time, Linux system signals are used to communicate with all the daemons at
once. There are several signals used by rotsed and the daq system:
- SIG_TERM: The termination signal
(15)1.1 is used to
tell a ROTSE daemon to shutdown cleanly. Usual system shutdown is
accomplished by issuing a SIG_TERM to rotsed, which passes on the signal
to the other daemons.
- SIG_ROTSE: The ROTSE signal (equivalent to
interrupt (2)) is used to tell all the ROTSE daemons to stop what they are doing and wait
for further commands. The camera will abort an exposure, the mount will stop
slewing, and the scheduler will interrupt its current programming for this
important announcement. This signal is used when a burst alert is received by
alertd, or when the weather turns bad in weathd.
- SIG_HUP: The hangup signal (1) is used to tell the
astrod scheduler to re-read its configuration file and reset the schedule,
as described in Section 4.1. The other daemons ignore this signal.
- SIG_KILL: When all else fails, a KILL signal (9)
can be used to terminate a daemon with extreme prejudice. A daemon killed in
this way might not exit cleanly.
When the weather turns bad, weathd signals a weather alarm in the shared
memory status, and sends out a SIG_ROTSE to
interrupt the other daemons. When rotsed receives a SIG_ROTSE in
conjunction with the weather alarm, it directs clamd to close the clamshell.
Figure 1.1:
The ROTSE-III Data
Aquisition system is made up
of a number of interconnected daemons which communicate through the central
rotsed. Each daemon interfaces with a different logically distinct
aspect of the telescope system. The daemons with asterisks are also able to
send Linux signals to interrupt the camera, mount, and scheduler.
|
Next: The Clamshell Daemon: clamd
Up: The Daemons
Previous: The Daemons
  Contents
  Index
Rotse Pager
2003-05-20