Skip to content

A HTTP server to monitor the status of AT-TPC DAQ workstaions

Notifications You must be signed in to change notification settings

ATTPC/attpc_sentry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

attpc_sentry

CI

A HTTP server to monitor the status of the AT-TPC DAQ workstations and organize run datafiles.

Installation

The only external dependency of attpc_sentry is the Rust toolchain. Installation instructions for the Rust toolchain can be found here.

Then to install attpc_sentry dowload this repository using git clone https://github.com/gwm17/attpc_sentry.git. After the repository is dowloaded move to the repository root and run the following command:

cargo run --release 

This will build and run the attpc_sentry program.

Server API

The sentry server has three endpoints

  • /status: query the status of data on the workstation
  • /catalog: move the DAQ run datafiles to a run-specific location

All endpoints return the status as the following JSON:

{
    "disk": "some_disk",
    "process": "some_process",
    "data_path": "/some/path/",
    "data_written_gb": 0.0,
    "data_path_files": 0,
    "disk_avail_gb": 0.0,
    "disk_total_gb": 0.0
}

Status Route

The status route checks the status of the dataRouter/DataExporter process, the amount of data written (since last check). This route is accessed using an HTTP GET request.

Catalog Route

This route moves DAQ data files to a experiment/run specific location This route is accessed using HTTP POST request with the following JSON data

{
    "experiment": "some_experiment",
    "run_number": 0,
}

Environment variables

The following variables should be defined in a .env file at the location from which attpc_sentry should be run.

DISK_NAME="Macintosh HD"
DATA_PATH="/Users/attpc/Data/mm#"
PROCESS_NAME="DataExporter"

Extra scripts

Also included in the repo are two scripts: attpc.sentry.plist and mmStartSentry.sh These are used in the AT-TPC DAQ workstations to autostart the sentry with the other DAQ tools. Generally they won't need modified.

About

A HTTP server to monitor the status of AT-TPC DAQ workstaions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published