A HTTP server to monitor the status of the AT-TPC DAQ workstations and organize run datafiles.
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.
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
}
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.
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,
}
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"
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.