EBIT front end commands
- Start Frontend
- Fix for ebit frontend getting stuck
- Instructions for recreating the SHM files for ebit
Start Frontend
- [ebit@lxebit ~/online]$ setenv MIDAS_EXPT_NAME test
- [ebit@lxebit ~/online]$ ./feebit_tig10 -e test -D
- [ebit@titan04 ~/online]$ mhttpd -p 8081 -e test -D
- [ebit@titan04 ~/online/tig_analyser]$ source README.vars
- [ebit@titan04 ~/online/tig_analyser]$ ./analyzer
- [ebit@titan04 ~/online]$ mlogger
- [ebit@lxebit ~/online]$ ./feebit_ppg -e ebit -D
- [ebit@titan04 ~/online]$ mhttpd -p 8089 -e ebit -D
- Make sure that mserver is running on titan04 (check by running ps -e | grep mserver). If not, type "mserver -D" in any titan04 prompt.
- [ebit@titan04 ~/packages/elog]$ ./elogd -c elogd.cfg -x
Fix for ebit frontend getting stuck
This is what you do:
Log on to lxebit as ebit,
then type "ipcs"
[ebit@lxebit ~]$ ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x4d0eb9a7 0 midas 666 1183808 0
------ Semaphore Arrays --------
key semid owner perms nsems
0x4d19636d 229376 ebit 666 1
0x4d0eb9a5 65538 midas 666 1
0x4d0eb9a6 98307 midas 666 1
0x4d0e3a27 131076 midas 666 1
0x4d0e3a28 163845 midas 666 1
------ Message Queues --------
key msqid owner perms used-bytes messages
Find the key for the Semaphore whose owner is ebit,
i.e. 0x4d19636d in the above example
Then remove that semaphore using ipcrm as follows:
[ebit@lxebit ~] ipcrm -S 0x4d19636d
Instructions for recreating the SHM files for ebit
Only do this is you get an error like this :
[mfe.c:729:register_equipment,ERROR] Cannot open event buffer "SYSTEM"
size 8388608, bm_open_buffer() status 218
from feebit
Most errors do not corrupt the data base.
NOTE: the lines beginning with "-" are comments.
- On titan04 log on as ebit
$ cd online
$ pwd
/home/ebit/online
- run odbedit ( can also say "odb -e ebit" )
$ odb
Available experiments on local computer:
0 : ebit
1 : test
Select number: 0
- if running, stop the run
[local:ebit:R]/>stop
Run #9193 stopped
- IMPORTANT - Now save the odb contents in the file ebit.odb
[local:ebit:S]/>save ebit.odb
- see what clients are running
[local:ebit:S]/>scl
Name Host
Logger titan04.triumf.ca
mhttpd titan04.triumf.ca
ODBEdit titan04.triumf.ca
- IMPORTANT remove all clients (except ODBEdit which is you)
If you have a kill-all command quit from odbedit and use that.
Otherwise remove the clients individually as follows:
[local:ebit:S]/>sh logger
12:36:30 [Logger,INFO] Program Logger on host titan04 stopped
[local:ebit:S]/>sh mhttpd
12:36:34 [mhttpd,INFO] Program mhttpd on host titan04 stopped
- now only ODBEdit is running. [local:ebit:S]/>scl
Name Host
ODBEdit titan04.triumf.ca
[local:ebit:S]/>quit
ebit@titan04:~/online
- Once all the clients are removed, delete all the .*.SHM files
- Only do this
if you have saved the odb (in ebit.odb -> see above) or
else you'll have to reload it from the odb file automatically saved
at the end of the last run
and if you have deleted all the clients from the odb
$ pwd
/home/ebit/online
ebit@titan04:~/online$ ls .*.SHM -lt
-rw-r--r-- 1 ebit users 1183808 Jun 12 12:37 .ODB.SHM
-rw-r--r-- 1 ebit users 116444 Jun 12 12:37 .SYSMSG.SHM
-rw-r--r-- 1 ebit users 8384512 Jun 11 21:34 .SYSTEM.SHM
-rw-r--r-- 1 ebit users 0 Jun 9 11:33 .RPC.SHM
-rw-r--r-- 1 ebit users 0 Jun 9 11:30 .ALARM.SHM
-rw-r--r-- 1 ebit users 0 Jun 9 11:30 .ELOG.SHM
-rw-r--r-- 1 ebit users 0 Jun 9 11:30 .HISTORY.SHM
-rw-r--r-- 1 ebit users 0 Jun 9 11:30 .MSG.SHM
ebit@titan04:~/online$ rm .*.SHM
rm: remove regular empty file `.ALARM.SHM'? y
rm: remove regular empty file `.ELOG.SHM'? y
rm: remove regular empty file `.HISTORY.SHM'? y
rm: remove regular empty file `.MSG.SHM'? y
rm: remove regular file `.ODB.SHM'? y
rm: remove regular empty file `.RPC.SHM'? y
rm: remove regular file `.SYSMSG.SHM'? y
- now run odbedit again to automatically recreate the .*.SHM files
ebit@titan04:~/online$ odb -e ebit
- and reload the odb from the saved file you just made
[local:ebit:S]/>load ebit.odb
[local:ebit:S]/>quit
- now you can see that the .*.SHM is recreated
ebit@titan04:~/online$ ls -lt .*.SHM
-rw-r--r-- 1 ebit users 1183808 Jun 12 12:38 .ODB.SHM
-rw-r--r-- 1 ebit users 116444 Jun 12 12:38 .SYSMSG.SHM
-rw-r--r-- 1 ebit users 0 Jun 12 12:38 .ALARM.SHM
-rw-r--r-- 1 ebit users 0 Jun 12 12:38 .ELOG.SHM
-rw-r--r-- 1 ebit users 0 Jun 12 12:38 .HISTORY.SHM
-rw-r--r-- 1 ebit users 0 Jun 12 12:38 .MSG.SHM
Now the feebit_ppg will work again