AlarmDisplay.tcl

 

Overview

AlarmDisplay.tcl is a tcl/tk script that provides a GUI front end for an alarm logger.  Applications can use this script and the associated C++ class CAlarmLogger to log alarms that occur while running.  The associated CAlarmServerApp application must also be running for the AlarmDisplay script to function.

Major features include:

 

Invocation

AlarmDisplay.tcl is invoked as follows:

AlarmDisplay [-h<host>] [-p<portnum>]

Where the optional “-h<host>” can be used to specify a host other than the default.  The default host is u3pc3.nscl.msu.edu.  The optional "-p<portnum>" can be used to specify a port number other than the default, which is either the value of daqalarm in /etc/services or 2702 if /etc/services is not configured for daqalarm.  Example:

         AlarmDisplay -hu2pc2 -p2703

will search for the server on host u2pc2 with port number 2703.

The AlarmDisplay script will invoke a tclserver, listening on the port specified above.  All applications wishing to log events to a displayer should be directed to this port, on whatever host AlarmDisplay happens to running (also, specified above).  The host that the logging application is running on must also be authorized to connect to the AlarmDisplay host using the "Host" dialog on the AlarmDisplay GUI.

 

Usage

The figure below is a screen shot of the AlarmDisplay GUI when it is first invoked.  The user is prompted to enter the id of their experiment.  If an id that has never had any alarms logged to it is entered, the user is prompted to verify that s/he entered the correct id.  The application can be closed by pressing the Cancel button, followed by the exit button, or by simply pressing the Escape key twice.

 

After entering a valid experiment id (and verifying it if necessary), the Alarm Display GUI pops up, as shown below:

The window title shows the running experiment id and the name of the host that the displayer is running on.  The body of the table shows alarms that have been logged to the display, and have not been dismissed.  When a new alarm is logged by an application, the display window will pop up to the top of the window stack (or become "maximized" if it was previously "minimized") and the system bell will ring every 3 seconds.  This ringing will continue until the alarm is acknowledged by highlighting it with the mouse and either clicking the "Acknowledge" button, or pressing Ctrl-A.  Once the alarm condition has been taken care of, the alarm can be dismissed from the display by pressing the "Dismiss" button, or Ctrl-D.  Once an alarm has been dismissed, it will no longer appear in the displayer, but it is still maintained in the alarm database.

The "Hosts" button will pop up a dialog that allows the user to specify a host name to add to the list of authorized hosts, or to remove hosts from that list.  Hosts which are in the list are the only ones allowed to log alarms to the Alarm Display.  The "Save History..." button prompts the user to enter the name of a file in which to save the experiment history.  The resulting file is a text file containing the entire history of logged alarms for the running experiment, including all dismissed alarms, with one line given to each alarm and each alarm separated by a blank line.  The "Exit" button exits the program.

 

Command Summary:

 

Troubleshooting:

  1. Whenever I try to invoke AlarmDisplay, I get the message can't find package Tablelist or can't find package Hostlist -- You probably do not have the path of the tablelist package provide script in the TCLLIBPATH environment variable.  In bash, type the following: export TCLLIBPATH="$TCLLIBPATH  /opt/daq/Scripts".  In csh, type the following: setenv TCLLIBPATH "$TCLLIBPATH /opt/daq/Scripts".

  2. My alarms are not being logged, but I am sure they are being sent by CAlarmLogger objects -- You probably need to add the logging host to the list of authorized hosts in the AlarmDisplay.  With the display open, click the "Hosts..." button, followed by the "Add" button.  You will be prompted to enter the name of the host to authorize.  Enter the name of the logging host, and press the "OK" button.  Close the host list display by pressing the "Close" button.

  3. When I try to open the AlarmDisplay, none of my alarms appear in the table even though I had alarms last time I used the display -- This could be one of a couple of different problems.  First, check to make sure that you entered the correct experiment ID.  The experiment ID is displayed in the navy colored title bar at the top of the display window.  Secondly, make sure that you are running AlarmServerApp from the same directory as the one containing the database files.  This will be whatever directory you ran from the last time you invoked the server.  By default, the server searches the current working directory for the database files and if it doesn't find them, it assumes that they do not yet exist.  You can determine whether or not you are in the right directory by checking the directory contents for the files ".alarmdb" and ".alarmcount" using the ls -a command.  Thirdly, make sure that the AlarmServerApp is running, and that you are successfully connecting to it.  If you get the message couldn't open socket: connection refused then it means that the AlarmDisplay was unable to form a connection with the AlarmServerApp and you either need to specify a different host/port combination using the -h and -p switches described above, or start the server if it is not yet running anywhere.

  4. When I try to open the AlarmDisplay, I get the message: error detected in client script command: from: Host: xx.x.xx.xxx -- This can also be because the server could not be found.  Be sure that the AlarmServerApp is running somewhere, and that you can successfully connect to it (see the previous point).

  5. I don't see my problem in this list -- email me: venemaja@msu.edu

  6. This documentation page was incomprehensible and/or unhelpful -- please email me with suggestions!

May 20, 2002 venemaja@msu.edu

NSCL Computer Group