On dcsdcp, there are now some command line tools for monitoring the output of the RPS units. Login as minos. They are rpsdaemon, rpsmicroscope, and rpsbox, and are described below. But first, a note on using rpsbox to debug a problem. Once a rack has been powered off, all alarms are set (since everything has failed due to lack of power). You care about what started the power down. So, duplicate the problem. Note that this involves subjecting the hardware to whatever ills the RPS was protecting it from, so beware. I am working on a software solution. 1) Power on the rack by locking the VAC reset. 2) once everything has powered back up, issue an output latch reset 3) the problem that remains is the problem which started things. Or at least is a problem which would shut down the rack if you weren't holding down the power button 4) Toggle off the VAC lock, let the rack rest in peace, and use your new information to fix the problem. Now, the program docs, followed by the source code location if you want to hack on it. rpsdaemon --------- /home/minos/rps is the directory containing the log files created by an always-running program called "rpsdaemon". Today's log is "rpsdaemon.log". Old logs are catted together into "rpsdaemoncats.log" on a nightly basis. If you want to stop and restart the daemon for any reason, type "rpsdaemonscript stop" or "rpsdaemonscript start" In this log file you will see lines of text like: Event at Wed Jan 15 14:37:35 2003 RPS-Rack14's ports are: $21 $00 $00 $00 Alarms/warnings set: (Main Alarm) (Smoke Alarm) So something (an "event") happened at the listed time. You see the rack ID, the raw RPS output, and the translation. In this case, the main alarm is set (this is set if any alarm gets set), and that there was a smoke alarm. Soon after you will see more entries, since when the power goes down, lots of things stop working: Event at Wed Jan 15 14:37:35 2003 RPS-Rack14's ports are: $2b $40 $01 $00 Alarms/warnings set: (Main Alarm) (Main Warn) (Vmon Warn) (Smoke Alarm) Problem VDC Channel:(+5VExt Under) Here you see that there is now a warning, as the +5VDC channel drops out. As more things lose power more problems appear. After that rack was fixed, powered back up, and the RPS status was cleared, you will see: Event at Wed Jan 15 14:38:55 2003 RPS-Rack14's ports are: $00 $00 $00 $00 Any change of status, even for the better (as in this case) is reported as an event. This is a perfectly happy unit, no error messages are translated from that string of 0's. Note that this daemon sends all the rps information to an sql database residing on dcsdcp. Information in this database is extracted, rootified, and sent on into the main minos data stream for posterity. rpsmicroscope ------------- This program is similar to rpsdaemon, but instead of watching the whole detector, watches just one rack - but polls it very rapidly so you can catch the action as it happens. Note that since rpsdaemon polls each rack in series, the status you see is an "or" of all the things that happened since the last time it happened to get polled. rpsmicroscope aims to let you avoid that problem. This one is meant to be run interactively. You select which rack to watch when the program starts. To exit, ctrl-C is safe. If you wish, you can specify the rpx box to be watched using the "-b" command line switch, ie, rpsmicroscope -b 12 would immediately start monitoring rack #12. rpsbox ------ This program is an interactive control panel for one RPS unit at a time. When you run it, you get to choose which rack to work with, are told what the current state of the unit is, then are presented with the following menu: Front Panel Buttons: s : reset smoke detector v : reset AC Relay Box o : reset output latch c : clear display a : silence alarm Other Functions: r : re-read x : complete reset p : power it up l : toggle VAC override (currently NORMAL) w : Write number to sysreset bits q : quit Selecting any item will do that command, and read back the status of the unit after a short pause. You can also specify your actions with the command line options -b and -c If you wish, you can specify the rpx box to be controlled using the "-b" command line switch, ie, rpsmicroscope -b 12 would specify box 12, and rpsmicroscope -b 12 -c x would issue an "x" complete reset command to box 12, then exit. Explanation of the available commands: -------------------------------------- The first five commands are the equivalent of pushing the appropriate front panel button with your finger for 0.5 seconds. Some of the others require a little more explanation: x : complete reset This is the same as pressing AC reset, output clear, and clear display in succession. l : toggle VAC override This will hold down the AC relay button for you ("LOCKED" mode) until you toggle it off or do a VAC reset command. Useful for keeping power to the rack while you debug a problem that's causing it to trip. DO NOT LEAVE THE RACK IN THIS MODE! Then no amount of flames will cause the power to turn off. Until it burns through the power cord, anyway. p : power it up This does the sequence you would do if standing in front of the unit. It holds down the AC relay button for 15 seconds, clears the output latch, and reads back the status. If things are ok, your rack is powered. If things aren't, it will try once more for 15 seconds. If the rack is not ok at that point, it gives up. w : Write number to sysreset bits Used to enable output ports on the back of the RPS, to eventually be used for remote reset lines. Source code ----------- The source code is in a cvs repository. You can point your cvs commands at this repository by setting setenv CVSROOT numi@lepton.d.umn.edu:/home/numi/Repository setenv CVS_RSH ssh setenv CVS_SERVER "env LOGNAME=`whoami` cvs" cvs checkout netlink This gets the driver library for the EDAS cards. "build.net" is a script to build the libbetlink.a library, but the makefiles it depends upon are very poorly written and it doesn't work without a lot of fiddling. cvs checkout rps This gets you a copy of the rps code. You'll want to modify the Makefile to point to your copy of the includes and library. Also note that if you have things set up in your account to compile the MINOS software, you likely have an environment variable MAKEFLAGS set. Unset this variable, it destroys the default behavior of "make" and screws up most standard Makefiles. make clean make depend make builds the code. If you're not familiar with cvs, please email me at ahabig@umn.edu and I can help out.