MONITOR CHAMBERS & GAS DATA BASE: HOW TO'S July 27, 2000 ========================================== 1) General setup: ----------------- The analog output signals of the monitor chambers are put into the LeCroy ADC which resides in the VME crate on the 2nd floor of the trailer. The Cetia CPU that controls that crate (currently hb-vme31) runs the program "gasmon.exe" to read out the digitized data and to ship it to the data base. On hera-b we run the data base server (sdbserver) and a program "fit.exe" that fits a Gaussian to the spectra and transmits the central position and the width of the peaks to the same data base. The results of the measurements, i.e. the raw spectra and the fit results, can be looked at with the data base display program "hbd_launcher". 2) Routine checks: ------------------ Make sure that the data taking for the monitor chambers is ALWAYS running and producing GOOD OUTPUT: a) In the X-Window Session on the LINUX PC (gashaus1) there should be some output in the "yellow" window at least EVERY MINUTE and NO obvious error messages. If this is not the case, the data acquisition is hanging and somthing has to be done about it. b) The most recent Fe55 spectra as displayed with the hbd_launcher display program should never be older than 30 minutes. If they are older, the data acquisition is hanging and somthing has to be done about it. The spectra should show one clear peak. If they are distorted (double peak, large shifts in either direction,...) something is wrong. 3) How to START the data aquisition from scratch (= if nothing is running yet): ------------------------------------------------------------------------------ a) - Login to the gashaus1 PC as user "hbotr". (If you don't know the password, ask Marcus or Uli Uwer or the OTR expert on shift in the control room.) The X-session should start now. - in the yellowish login window give the following commands: COMMAND MEANING xhost + allows other machines to open windows on this PC telnet hera-b switch to the hera-b machine. The DAQ must be user: hbotr run from there. password: see above cd /hb/otr2/GASMON go to the directory that contains the programs gasmon_START.sh executes a UNIX shell script that starts all the necessary programs. At this point the DAQ should be running. If there are no error messages at this point you are taking data !! c) What gasmon_START.sh does in detail: - it checks if the data base server "sdbserver 10210" which writes to the file "/hb/otr2/GASMON/gasmon.db" is running. If not, it starts it. - it checks if the process "gasmon.exe", which reads out the ADC, is running on the VME processor hb-vme31 (Cetia CPU). If not, it starts this process on this VME processor. - it executes the fitting program "/hb/otr2/GASMON/fit.exe" on hera-b to get fitted means and sigmas of the distribution and ships it to the data base. 4) How to look at the data: --------------------------- - By clicking on the background of the screen open a menu and start a new X window. Assuming you are logged into the new LINUX machine in the gashut as "hbotr" issue the following commands: cd gas start_hbd_launcher.sh This executes the script "start_hbd_launcher.sh" which will setup all necessary variables under AFS and then start the display program "hbd_laucnher". It is already configured in such a way that you will get 4 windows with the raw spectra for the HASYLAB monitor chamber, and the 2 Zeuthen monitor chamber. Ch.4. is not connected at the moment. Windows 5 and 6 show the plotters for mean and sigma for all 4 channels. These 6 windows should always be present on the new LINUX machine in the gashut. This procedure should also work on all other LINUX machines, e.g. hb-cr.. or hb-af.. (..=1-20) into which you can login as "hbotr" under AFS (in case there is a problem with the LINUX machine in the gashut). - STARTING hbd_launcher BY HAND to look at OLD DATABASE FILES: in hbd_launcher DateBase -> view -> Edit-> Name: gas Location: hera-b:10210 -> Add/Change -> Distribute -> Done _________________________________________________ Display-> Start-> Display1 ... _________________________________________________ in Display1 ( spectra input gas) : Icon "Open" in Window "Choose DB entry..." h-11.h1 ->Ok in window "Vector " x-Component: z-Component: data Ok _________________________________________________ in Display2 (spectra output gas) : Icon "Open" in Window "Choose DB entry..." h-12.h1 ->Ok in window "Vector" x-Component: z-Component: data Ok _________________________________________________ in Display3 ( fit ): Special->Combine Data-> Fe55 ->Ok in Window "Choose DB entry..." Data : fe55pos (or sigma) Index: 1 Last N: 1000 Ok icon "Add histograms" -> Fe55->Ok Data : fe55pos ( or sigma) Index: 2 Last N: 1000 Ok _______________________________________________ ( - If you absolutely need to run hbd_launcher on the online machines as was done before we had the new LINUX machine in the gashut, do the following: telnet hb-con06 user: hb-otr (note that this is different from "hbotr") password: ask Marcus cd /gas gas This executes the script "gas" which will start the display program "hbd_laucnher". It is already configured in such a way that you will get 2 windows with the raw spectra for the HASYLAB monitor chamber and 2 "plotter" windows with the fitted mean and sigma respectively. These 4 windows should always be present on the X-session. ) 5) Known problems: ------------------ a) It is possible that the gasmon.db file in /hb/otr2/GASMON is corrupted. If the file has reasonable length, make a copy of it and put it into the DB-archive. Then delete gasmon.db . If gasmon.db has only a 1 byte length, just delete it. Then try gasmon_START.sh again. 6) How to look at the current data in the database: --------------------------------------------------- 0) in yellow login window make sure that command 'xhost +' was issued 1) login on hb-cr20 as hbotr (password as usual) 2) cd gas 3) db_gui.sh This will pop up a slow control (SLC) user interface window. 4) In this SLC window make sure that the little button 'master/client' is NOT pushed in; i.e. it should be gray, not black. This makes your UI a client. It should not be a 'master', which is used in the control room. 5) Push 'Connect' Button IF connection is successful, the Status will change to Ok and the State to READY. This means that the database process is running correctly. Click on the View button. This opens a window with the latest gas analysis values; opening might take a few seconds. Leave this window always on the screen, so we can check the current situation. 6) Check on "Filip's" NT PC that the data base communicator is running properly. See Filip's instructions. 7) Maintaining the data base program "spc_ot_gas" that collects data from the DB communicator ------------------------------------------------------------------------------- a) How to start the standalone data base program (spc_ot_gas): Login to hb-cr20 as hbotr. cd ~/gas/gas_control Use the command "spc_run spc_ot_gas &" to start it. Don't forget the "&" at the end of the command line. In the first run, this version will create a log file in /tmp/ directory named "spc_ot_gas.standalone". In your window you will see a lot of messages. If the command "spc_run spc_ot_gas" fails to restart, then check if there is an old hanging process "spc_ot_gas". ("ps -a"). If yes, kill it ("kill -9 spc_ot_gas"). If your "spc_run spc_ot_gas" still fails, use the command "namdir" to see if a process "spc_ot_gas" is still listed there. If yes, "remove" it from the namdir list. Try again "spc_run spc_ot_gas". Now it should work. Do "tail -f /tmp/spc_ot_gas.standalone" to check if the log file shows that the gas control was restarted. After that, you have to start the GUI by giving the command "gui_ot_gas gui_ot_gas.tcl" (or simply "db_gui.sh") from another window on hb-cr20 (also as user "hbotr"). Connected as Master, pushing State -> Change to... -> CONFIGURE will start data taking. To make things look nice you can keep pushing until you will be in the nice green READY state. (State -> Change to ... -> STOP will stop the running process.) If you can't change the State in the GUI, call the control room and ask them if the 2nd GUI that is running there for the shift crew is the "Master". If yes, ask them to push the little black button at the bottom to change it to "Slave". Then you will be able to connect as "Master" from the gashut ("Master" is like Duncan McLeod: there can be only one !). If it still doesn't work maybe Marcus also has a GUI in his office. Call him... After that is done "exit" from the window where you gave the "spc_run spc_ot_gas &" command. You have to do it twice as it will tell you that you have running jobs (namely the spc_ot_gas process that should keep running even after you exit the terminal). b) What to do if the nameserver gets rebooted or several versions of the spc_ot_gas program are running: The symptom: times entries in log file are out of order; example: Thu Jul 27 14:24:40 2000 Get data for ot/gas/MIX. time_out=935 Thu Jul 27 14:24:47 2000 No data come. curtime-last_data_time=914, time_out=900 Thu Jul 27 14:24:47 2000 Rebuild connection because time out. Thu Jul 27 14:25:08 2000 Before open a new socket, s = 0 Thu Jul 27 14:25:08 2000 Connected successful. s = 0 Thu Jul 27 14:25:10 2000 No data come. curtime-last_data_time=915, time_out=935 Thu Jul 27 14:25:19 2000 No data come. curtime-last_data_time=402, time_out=935 Thu Jul 27 14:25:21 2000 No data come. curtime-last_data_time= 41, time_out=935 Thu Jul 27 14:25:28 2000 No data come. curtime-last_data_time= 20, time_out=900 Thu Jul 27 14:25:50 2000 No data come. curtime-last_data_time=955, time_out=935 Thu Jul 27 14:25:50 2000 Rebuild connection because time out. Thu Jul 27 14:25:59 2000 No data come. curtime-last_data_time=442, time_out=935 Thu Jul 27 14:26:00 2000 Before open a new socket, s = 0 Thu Jul 27 14:26:00 2000 Connected successful. s = 0 Thu Jul 27 14:26:01 2000 No data come. curtime-last_data_time= 81, time_out=935 Thu Jul 27 14:26:08 2000 No data come. curtime-last_data_time= 60, time_out=900 Thu Jul 27 14:26:30 2000 No data come. curtime-last_data_time= 30, time_out=935 Thu Jul 27 14:26:40 2000 No data come. curtime-last_data_time=483, time_out=935 Thu Jul 27 14:26:41 2000 No data come. curtime-last_data_time=121, time_out=935 Thu Jul 27 14:26:48 2000 No data come. curtime-last_data_time=100, time_out=900 The cure (from Xiaowei): On last Sunday, nameserver was rebooted. In this case, you can't restart spc_ot_gas in gas GUI. So more and more processes was started. But even in this case, there is always one process connected with GasServer and sent data into database. The others are busy in rebuilding connection. Next time when you try to retart spc_ot_gas, you can execute "ps afx | grep gas" first and count the number of line "spc_ot_gas -SMCCFG:leaf.cfg -SMCDBG:2 -SPCDBG:1 -SMCPA". If amount of same processes is greater than 1, you have to delete them by hand. Please don't forget delete register entry from nameserver. -------------------------------------------------------------------------- This file can be found under /hb/otr2/GASMON/how_to.txt; maintained by Marcus Hohlmann (hohlmann@mail.desy.de).