Declad: Difference between revisions

From Mu2eWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction to Declad ==
== Introduction to Declad ==
Transfer data from our DAQ machine to tape/persistent. Has been running stably on <code>mu2e-dl-01</code>.
Transfer data from our DAQ machine to tape/persistent. Has been running stably on <code>mu2e-dl-01</code>.


== Online ==
== Online ==
===mu2eraw account===
The mu2eraw account has its own kerberos principle, which will always be available to you after you log in.  The principle is is unique for mu2e-dl-10 and 02, and does not exist for mu2eraw account on other nodes.


=== Accessing the <code>mu2e-dl-01</code> ===
We recommend to
  ssh -K $USER@mu2egateway
to get to gateway in your account, with your principle, then
ssh -k mu2eraw@mu2e-dl-01
the <code>-k</code> switch stops kerberos from forwarding your principle and overwriting the mu2eraw principle.  If you do overwrite, operations may be interrupted and your credentials may be exposed.
 
The following jump seems to work correctly
ssh -k mu2eraw@mu2e-dl-01 -J $USER@mu2egateway01 klist
 
=== Accessing the <code>mu2e-dl-01</code> monitor page ===


Ssh tunnel
Ssh tunnel
Line 61: Line 73:
     CGroup: /user.slice/user-59675.slice/user@59675.service/app.slice/file_watcher.service
     CGroup: /user.slice/user-59675.slice/user@59675.service/app.slice/file_watcher.service
             └─2910881 /home/mu2eraw/ops/0/custom/file_watcher/bin/python /home/mu2eraw/ops/0/custom/file_watcher/file_watcher.py
             └─2910881 /home/mu2eraw/ops/0/custom/file_watcher/bin/python /home/mu2eraw/ops/0/custom/file_watcher/file_watcher.py
 
 
   Jun 19 16:13:21 mu2e-dl-01.fnal.gov systemd[3844510]: Started User-level File Watcher with venv.
   Jun 19 16:13:21 mu2e-dl-01.fnal.gov systemd[3844510]: Started User-level File Watcher with venv.


== Offline ==
== Offline ==

Latest revision as of 15:59, 7 August 2025

Introduction to Declad

Transfer data from our DAQ machine to tape/persistent. Has been running stably on mu2e-dl-01.


Online

mu2eraw account

The mu2eraw account has its own kerberos principle, which will always be available to you after you log in. The principle is is unique for mu2e-dl-10 and 02, and does not exist for mu2eraw account on other nodes.

We recommend to

 ssh -K $USER@mu2egateway

to get to gateway in your account, with your principle, then

ssh -k mu2eraw@mu2e-dl-01

the -k switch stops kerberos from forwarding your principle and overwriting the mu2eraw principle. If you do overwrite, operations may be interrupted and your credentials may be exposed.

The following jump seems to work correctly

ssh -k mu2eraw@mu2e-dl-01 -J $USER@mu2egateway01 klist

Accessing the mu2e-dl-01 monitor page

Ssh tunnel

ssh -4 -f -X -N -L 8080:localhost:8080 -J ${USER}@mu2egateway01 ${USER}@mu2e-dl-01

In browser:

localhost:8080

Locations

The declad runs from cvmfs, the set up code is at /home/mu2eraw/ops/0/start.sh. To start declad, run:

 cd /home/mu2eraw/ops/0
 ./stop.sh && ./start.sh

The declad will watch for new files in the dropbox area: /data/DAQ/dropbox

A file watcher for small files

Set up daemon:

 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ loginctl enable-linger $USER
 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ mkdir -p ~/.config/systemd/user

Edit the file:

 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ vi ~/.config/systemd/user/file_watcher.service
 # ~/.config/systemd/user/file_watcher.service
 [Unit]
 Description=User-level File Watcher with venv
 After=default.target
 
 [Service]
 Type=simple
 ExecStart=/home/mu2eraw/ops/0/custom/file_watcher/bin/python /home/mu2eraw/ops/0/custom/file_watcher/file_watcher.py
 WorkingDirectory=/home/mu2eraw/ops/0/custom/file_watcher/
 Restart=on-failure
 StandardOutput=append:/home/mu2eraw/ops/0/custom/file_watcher/logs/file_watcher.log
 StandardError=append:/home/mu2eraw/ops/0/custom/file_watcher/logs/file_watcher.err.log
 Environment=PYTHONUNBUFFERED=1
 
 [Install]
 WantedBy=default.target

Reload the daemon:

 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ systemctl --user daemon-reexec
 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ systemctl --user daemon-reload
 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ systemctl --user enable file_watcher.service
 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ systemctl --user start file_watcher.service
 (file_watcher) [mu2eraw@mu2e-dl-01 file_watcher]$ systemctl --user status file_watcher.service
 ● file_watcher.service - User-level File Watcher with venv
    Loaded: loaded (/home/mu2eraw/.config/systemd/user/file_watcher.service; enabled; preset: disabled)
    Active: active (running) since Thu 2025-06-19 16:13:21 CDT; 45min ago
  Main PID: 2910881 (python)
     Tasks: 5 (limit: 407569)
    Memory: 10.5M
       CPU: 106ms
    CGroup: /user.slice/user-59675.slice/user@59675.service/app.slice/file_watcher.service
            └─2910881 /home/mu2eraw/ops/0/custom/file_watcher/bin/python /home/mu2eraw/ops/0/custom/file_watcher/file_watcher.py
 
 Jun 19 16:13:21 mu2e-dl-01.fnal.gov systemd[3844510]: Started User-level File Watcher with venv.

Offline