Project

General

Profile

Decoder Cheatsheet

In a pinch, these should be the core answers to the important questions you might have.

IS THE MAINDAQ DECODING DAEMON RUNNING?

Log into the production user on gat4:

ssh production@e906-gat4.fnal.gov

Look for the decoding daemon running:

ps aux | grep maindaq-decoding-daemon

You should see this:

production@e906-gat4:~/seaquest-decoding ps aux | grep maindaq-decoding-daemon
45347    20278  0.0  0.0 139552  7488 pts/12   S+   16:49   0:01 /usr/bin/perl -w /seaquest/bin/maindaq-decoding-daemon
45347    21572  0.0  0.0 103304   860 pts/17   S+   17:44   0:00 grep maindaq-decoding-daemon

If it is not running, start it!

Enter the running screen session:

screen -r 
maindaq-decoding-daemon
<Crtl+a>, <d>

If there is no screen, start one. If the screen tab you're on is doing something already, create a new tab with <Crtl+a>, <c>.

See the documentation for more: The MainDAQ Decoding Daemon

IS THIS MAINDAQ RUN DECODING?

Log into the production user on gat4:

ssh production@e906-gat4.fnal.gov

Look to see what decoding jobs are running:

production@e906-gat4:~ ps aux | grep maindaq-decoder
45347    22136 47.2 12.9 1179404 1039736 pts/12 R+  18:37  21:41 
    maindaq-decoder --sampling=1 -o --server=e906-db1.fnal.gov --verbose --schema=run_016332_R001 
                    --file=/codadata/run_016332.dat --root=/tmp/20278.root 
                    --dir=/tmp/016332+e906-db1.fnal.gov+run_016332_R001
45347    22549 35.1 12.6 1157072 1015720 pts/12 R+  19:14   3:07 
    maindaq-decoder --sampling=1 -o --server=e906-db1.fnal.gov --verbose --schema=run_016333_R001 
                    --file=/codadata/run_016333.dat --root=/tmp/20278.root 
                    --dir=/tmp/016333+e906-db1.fnal.gov+run_016333_R001
45347    22738 78.1 10.2 954968 826420 pts/17  R+   19:23   0:08 
    maindaq-decoder --sampling=1 --server=e906-db1.fnal.gov --verbose --schema=run_016320_R001
                    --file=/codadata/run_016320.dat --root=/tmp/16320.root 
                    --dir=/tmp/016320+e906-db1.fnal.gov+run_016320_R001
45347    22751  0.0  0.0 103304   856 pts/16   S+   19:23   0:00 grep maindaq-decoder

If you see the 'run_XXXXXX_R001' in the list, then it is decoding. You can take a look at its output by attaching to the screen (screen -r).

If there are too many jobs (>5 maindaq-decoder) jobs running: Attach to the screen, kill the maindaq-decoding-daemon, increase the sampling factor, and start the daemon again. Optional: Manually re-decode the processes you killed at a higher sampling rate if desired.

screen -r
(go to screen tab with maindaq-decoding-daemon running via <Crtl+a>, <n>)
<Crtl+c> (kill the daemon)
su (must be root to edit files in /seaquest/bin)
vim /sequest/bin/maindaq-decoding-daemon (increase sampling factor, save, quit)
exit
maindaq-decoding-daemon
<Ctrl+a>, <d>

HOW DO I DECODE THIS RUN?

Get the seaquest-repository (Getting the Software), go to seaquest-decoding, and execute 'source setup.sh'. Then call the maindaq-decode script.

maindaq-decode --file /codadata/run_XXXXXX.dat --server e906-db1.fnal.gov --schema run_XXXXXX_R001 --sampling 1

To send an email notification to a target recipient when the decode is complete, add the command line option:

--email myemail@mydomain.com

You can send a notification to multiple recipients by concatenating them together with a comma:

--email myemail@mydomain.com[,anotheremail@domain.gov[,...]]

For more, see the documentation here: The MainDAQ Decode

IS THE BEAMDAQ DAEMON RUNNING?

From gat4, you can also look to see if the BeamDAQ Daemon is running:

production@e906-gat4:~/seaquest-decoding ps aux | grep beamdaq-daemon
45347    18101  0.0  0.2 186348 16896 pts/10   S+   13:15   0:09 /usr/bin/perl -w /seaquest/bin/beamdaq-daemon
45347    21635  0.0  0.0 103304   860 pts/17   S+   17:49   0:00 grep beamdaq-daemon

If it is not running, start it!

Enter the running screen session:

screen -r 
beamdaq-daemon
<Crtl+a>, <d>

If there is no screen, start one. If the screen tab you're on is doing something already, create a new tab with <Crtl+a>, <c>.

To upload a single BeamDAQ file, use the beamdaq-upload script found in /seaquest/bin.

beamdaq-upload --file /seaquest/data/beamDAQ/cerenkov_data/db/db_runXXXXX.dat --schema scaler_201YWW

XXXXX: non-zero-padded run number
Y: year
WW: week of the year

See the documentation for more: The BeamDAQ Decoder

IS THE SCALERDAQ DAEMON RUNNING?

Log into the production user on gat4 (standard seaguest password):

ssh online@e906sc3.fnal.gov

Look for the decoding daemon running:

ps aux | grep scalerdaq-decoding-daemon

You should see this:

online@e906sc3:~ ps aux | grep scalerdaq-decoding-daemon
online    2256  0.2  0.0  10096  5552 pts/1    Ss+  Oct27  25:25 /usr/bin/perl -w /home/online/scalerdaq-decoding-daemon
online   32051  0.0  0.0   4360   744 pts/11   S+   17:52   0:00 grep scalerdaq-decoding-daemon

If it is not running, start it!

First determine if there is a screen session for it:

screen -list

If there is a session, then reattach to it and restart the decoder by:
screen -r 
scalerdaq-decoding-daemon
<Crtl+a>, <d>

If there is no screen, start one.

screen -dmS scalerdaq-decoding-daemon scalerdaq-decoding-daemon

If the screen tab you're on is doing something already, create a new tab with <Crtl+a>, <c>.

To manually decode a scalerDAQ run, execute:

scalerdaq-decode --file /home/e906daq/data/codadata/scaler_XXXXX.dat --schema scaler_201YZZ

See the documentation for more: The ScalerDAQ Decoder