Previous Next Table of Contents

3. Components in detail

3.1 MOSLER.TCL: the Tcl/Tk Graphical User Interface

The Tcl/Tk script mosler.tcl presents a graphical overview of the current status of the system with a screen like that shown in Figure Main-Screen. This real-time display of sensor readings is accomplished by mosler.tcl polling the solusd process for current values.

Each site or location (as in solus1, solus2 ...)is represented by a button showing the current reported readings from that location. More detailed information about the site can be viewed and edited by selecting the button, generating the display of a site-specific window as in Figure Site-Screen

Several notable indicators in the behavior of the mosler.tcl main screen:

3.2 SOLLOG: the solus data logging daemon

To be able to accumulated historical trends in the sensor readings, the sollog deamon is provided as a utility to log readings to disk file.

On startup sollog will read the global configuration file Sensors.cnf which informs it where to get the readings from (with the settings for datahost and dataport), how frequently to poll for the readings (pollinterval), and what file to append these readings to (logdir).

If any of these settings change -- for example by having edited them within the mosler.tcl GUI -- sollog will have to be re-started for them to take effect.

The log file that all readings are stored in is in the directory specified by the setting for logdir, with the filename "datlog". At this time, this file will grow forever as it is always appended to every time sollog has more data or is re-started. It is the responsibility of the system administrator to periodically do maintenance on this file -- for example by periodically archiving off its contents and truncating its length.

3.3 SOLUSD: the solus data gathering daemon

The base producer process, solusd is designed to be the only program that needs intimate knowledge of the hardware details of communicating out through serial COM devices to the CT2500 dataloggers.

After reading the Sensors.cnf configuration file, this program will attempt to establish communications with all the enabled dataloggers defined therein. This process includes gaining access to the serial port and sending an initialization sequence to the datalogger at the other end. Once this is done, solusd is ready to relay commands and data between client programs and the datalogger. For as long as it remains running, sousd remains in an infinite loop waiting for socket-connections and servicing the requests that arrive on those sockets.

solusd is also responsible for handling the electrical properties of the sensors installed and has knowledge of how to set alarm points and do the unit-conversions for each sensor. These capabilities are compiled into the program and the names of the sensors specified in Sensors.cnf must match one of the pre-defined names compiled into solusd.

The most common cause for failure in solusd is a problem on the serial line, thus a failure of the initialization sequence with a datalogger. These kinds of problems can generally be ironed out with the use of simple terminal programs (such as cu) to manually and interactively be able to verify serial devices, baud-rates, etc.


Previous Next Table of Contents