July 2, 2020

SOML control room software - Meter cube startup procedure (linux version)

This is an outline of the steps needed to start the control room software on the linux machine in the control room. Since pilots with much more experience than I have may use and want to suggest corrections or additions to this procedure, I want to invite them to do so. Send email to tom@mmto.org

This assumes that the VME computer has already been booted. This is just a matter of turning it on, it still boots from the old Sun workstation "crater".

The red window has traditionally been used to start "ovene".

The blue window has traditionally been used to start "ovend" and run "oven"

Whatever window you use to type "start_mcube" may be worth keeping around for various uses, or may be closed or minimized.

Check for shared memory segments

The "ipcs" command shows all shared memory segments. There are a lot of them on linux and most have nothing to do with the oven. For this reason, I set up a command "oven_ipcs" that screen out everything not having to do with the oven.

Running it, with a shared memory segment already in place for the meter cube yields the following:

oven_ipcs
0x00000110 59         pilot      644        263748     2
If you don't see a line like the above with with the 0x00000110 value, you will need to create a shared memory segment. Do this by starting the oven program as follows, then immediately exiting it.
oven -M
If you wanted to delete the above shared memory segment
ipcrm -m 59
Here the number "59" comes from the second column of the above display and will be different each and every time.

Check for background processes

You should also check for any daemon (background) processes. If you find them, you get to decide whether to use them as is, or to kill them and restart them as described below. What you do not want to do is to start duplicate background processes, particularly of the ovend process.

Use command:

ps -alx | grep oven
Doing this "right now", I see the following:
ps -alx | grep oven
0  1004  2246     1  20   0   3608  2244 -      S    pts/4      0:00 xgterm -name ovenRed -title Red IRAF XGterm (orig) -e cl
0  1004  2247     1  20   0   3612  2244 -      S    pts/4      0:00 xgterm -name ovenGreen -title Green IRAF XGterm (orig) -e cl
0  1004  2248     1  20   0   3652  2244 -      S    pts/4      0:00 xgterm -name ovenPurple -title Purple IRAF XGterm (orig) -e cl
0  1004  2249     1  20   0   3836  2532 -      S    pts/4      0:00 xgterm -name ovenBlue -title Blue IRAF XGterm (orig) -e cl
0  1004  3606     1  20   0  11608  8892 -      S    ?          0:24 ovend -M
0  1010  8869  8818  20   0 215748   888 -      S+   pts/9      0:00 grep --color=auto oven
This shows the ovend background process running with the -M option (hence for the meter cube) along with the various terminal windows being used by the oven pilot. If you wanted to start clean from scratch, you would probably want to kill the ovend process using the command:
kill -9 3606
The number "3606" will be different each time. It is the "PID" of the intended process to be killed and comes from the third column in the above display.

Start the error daemons (Red window)

In the red window, type the following commands:
nohup ovene -M &
oven
Set the oven program in the red window to read the error log.

Start the data daemon and GUI (Blue window)

You don't want to start background jobs (daemons) if they are already running, see above on shared memory and background processes.

I don't believe you need the "P" and "B" daemons for the meter cube, but you can certainly start them should you care to:

nohup ovenp -M &
nohup ovenb -M &
If you are going to run these, standard wisdom is that it is best to start them before booting the VME computer.

You definitely need to start the "D" daemon if it is not already running. Use one of the following commands.

nohup ovend -M &
nohup ovend -M -nol &
The "-nol" switch says to not log information to FITS files, which may often be appropriate when the meter cube is being used.

Last, but not least, you need to start the oven GUI via:

oven -M
The blue window will now run the oven program talking to the shared memory segment for oven1v0. You should get fresh data each minute.

Good luck !