BNL RHIC STAR Computing | ||
TOFp DAQ Local User's Guide | ||
Maintenance | ||
TOFp DAQ PC runs RedHat Linux 6.2. In case of the system crash, the file system will be checked automatically when the system reboot. Normally, it should pass safety, but in some case, user interaction is needed. This is very danger for us, because we can't reach the PC when running. So we setup a dual boot Linux system. One for running, the other one for maintenance. Whenever after system reboot, it will run "lilo" automatically, which make the next reboot will switch to another system automatically, this system must can reboot success. To ensure this, we should check the other system's filesystem immediately after we login to this system.
/etc/rc.d/rc.local: put /sbin/lilo to run lilo automatically after reboot
% cat /etc/issue
% ~tofp/bin/fscheck
% ~tofp/bin/reboot
[tofp@tofp ~]% telnet tofpdaq |
current only config.dat, all the configuration information for ADC/TDC/A2D/LAMG/2601/CV/Jorway station, channel, lamg delay time,
current only cvlog: crate verifier result
tofpMother: a soft link to ~liuzx/software/ks2915/daq/src/tofpMother, tofpMother spawn all the other programs with absolute path, so we needn't to copy all the other programs to here!
the main program for whole TOFp DAQ system, from the name, this program fork all the other child progress (current 5) for TOFp DAQ: runcontrol, getdata, senddata, monDisplay, localmon. Also, this is the only program can start/restart/stop the TOFp DAQ system. Type C-C (which is normaly for interrupt a program, but here we change it.) to restart all the child program, tofpMother won't restart. Type C-Z (which is normaly for stop a program) to stop the whole TOFp DAQ system, all the program (include tofpMother) will exit.
the main program for RUN CONTROL, this program receive command from STAR Run Control system and do correspond process.
the main program for GET DATA from TOFp CAMAC Crate, and save the data in a share data buffer
then main program for SEND DATA to STAR DAQ
send TOFp system status to STAR monitor program
send part of the rawdata for TOFp local monitor
The driver for KS2915 will be loaded automatically, so one needn't to care about this. Use /sbin/lsmod to check. (cc_2915 is the module name)
the executable files here is only a link to the real programs, see below
current rtsLogServer and logcheck.pl
tofp daq local monitor programs
tofp daq log information files
tofp daq local log server program, log information for tofpdaq local test and all the other local monitor program, this program listen on udp port, usage: rtsLogServer /location/for/log/file port, (we need 8010 now, 8000 is reserved for later use), but, one needn't to care about this program, it's run automatically when system startup, and the log files are rotated every day, 8 days log file will be saved
this is a small perl script used to display different log information in different color on a Linux XTerm (DEBUG => normal, NOTICE => green, WARNING => magenta, ERROR => cyan, OPERATOR => red, CRITICAL => reverse red).
TOFp local monitor program, this program received TOFp DAQ raw data from daq localmon program, save them into a local file and plot some histograms! (more info to be added, ...)
For convenience, most of the program sent error or other debug information to a central log server (daqman.star.bnl.gov for daq program, tofp.starp.bnl.gov for local monitor program). All the log files are in following directory:daqman.star.bnl.gov:/RTS/log and tofpdaq.star.bnl.gov:~tofp/daq/log
tofp.starp.bnl.gov mount daqman.star.bnl.gov:/RTS as /RTS, so one can check all the log files on tofp.starp.bnl.gov local.
Log files on daqman.star.bnl.gov are rclog (on udp 8000), rclog8001, rclog8002, rclog8003, rclog8010. (current we use 8010)
Log files on tofp.starp.bnl.gov are rclog8010.
To check the log information, use:
% tail --follow=name /RTS/log/rclog8010
if you want to color display for different kind of log information, use:
% tail --follow=name /RTS/log/rclog8010 | ~tofp/daq/bin/logcheck.pl
open two xterm window, run these two programs:
tail --follow=name /RTS/log/rclog8010 | ~tofp/daq/bin/logcheck.pl
tail --follow=name ~tofp/daq/log/rclog8010 | ~tofp/daq/bin/logcheck.pl
Then you'll see all the information output from all the programs
Following example show how to start/restart/stop all the daq program, and show the status of daq program. (Attention: there will be some difference for the real run output.)
[tofp@tofpdaq ~]% tofpdaq
*** Usage: tofpdaq {start|stop|status|restart}
[tofp@tofpdaq ~]% tofpdaq status
tofpMother is not running...
[tofp@tofpdaq ~]% tofpdaq start
Starting TOFp DAQ program: [ OK ]
[tofp@tofpdaq ~]% tofpdaq status
tofpMother (pid 664) is running...
PPID PID USER NI PRI %CPU %MEM STARTED TIME ELAPSED C S WCHAN CMD
1 664 root 0 29 1.0 1.2 Sun Jun 24 23:14:12 2001 00:00:00 00:01 1 S wait4 tofpMother -daemon
664 665 root 0 34 3.0 0.5 Sun Jun 24 23:14:12 2001 00:00:00 00:01 3 S nanosl runcontrol --emulation
664 666 root 0 32 0.0 0.6 Sun Jun 24 23:14:12 2001 00:00:00 00:01 0 S do_pol getdata
664 667 root 0 34 0.0 0.5 Sun Jun 24 23:14:12 2001 00:00:00 00:01 0 S inet_w senddata
664 668 root 0 34 2.0 0.5 Sun Jun 24 23:14:12 2001 00:00:00 00:01 2 S nanosl monDisplay
664 669 root 0 34 0.0 0.5 Sun Jun 24 23:14:12 2001 00:00:00 00:01 0 S nanosl localmon
[tofp@tofpdaq ~]% tofpdaq restart
Are you sure you want to restart tofpdaq program: (Y)es/(N)o? [N] y
Restarting TOFp DAQ program. [ OK ]
[tofp@tofpdaq ~]% tofpdaq status
tofpMother (pid 664) is running...
PPID PID USER NI PRI %CPU %MEM STARTED TIME ELAPSED C S WCHAN CMD
1 664 root 0 29 0.1 1.2 Sun Jun 24 23:14:12 2001 00:00:00 00:15 0 S wait4 tofpMother -daemon
664 668 root 0 38 0.1 0.5 Sun Jun 24 23:14:12 2001 00:00:00 00:15 0 S nanosl monDisplay
664 679 root 0 36 0.0 0.5 Sun Jun 24 23:14:22 2001 00:00:00 00:05 0 S nanosl runcontrol --emulation
664 680 root 0 35 0.2 0.6 Sun Jun 24 23:14:22 2001 00:00:00 00:05 0 S do_pol getdata
664 681 root 0 34 0.0 0.5 Sun Jun 24 23:14:22 2001 00:00:00 00:05 0 S nanosl senddata
664 682 root 0 34 0.2 0.5 Sun Jun 24 23:14:22 2001 00:00:00 00:05 0 S nanosl localmon
[tofp@tofpdaq ~]% tofpdaq stop
Are you sure you want to stop tofpdaq program: (Y)es/(N)o? [N] y
Shutting down TOFp DAQ program: [ OK ]
[tofp@tofpdaq ~]% tofpdaq status
tofpMother is not running...
[tofp@tofpdaq ~]%