NDTS Daemon Installation

From Network for Advanced NMR
Revision as of 18:57, 3 June 2025 by Mmaciejewski (talk | contribs)
Jump to navigationJump to search

NDTS Daemon & GUI Installation (Spectrometer Workstation)

The NDTS Daemon and GUI must be installed separately on each NAN connected spectrometer

Prerequisites

  1. Gateway IP address
    • The spectrometer workstation must be able to connect to the Gateway IP address on TCP port 60195
  2. Exact Instrument Name (set in the Facility Dashboard – no spaces)
  3. Workstation UUID (generated when the spectrometer was added)

WARNING: If you are installing on Alma Linux make sure that the chkconfig package is installed before proceeding. Without this service package, the NDTS Workstation will not properly install or run on Alma.

Installation Steps

# Copy the .gz file to the workstation
tar xf data-transport-daemon.<distro>-<version>.tar.gz
cd dtdaemon-installer
sudo ./install.sh
# → Prompts:
#   • Gateway IP address
#   • Instrument name  (e.g., nmr600)
#   • Workstation UUID

Updating the Daemon

# Best practice: ensure no acquisition is running and the UI is closed
cd dtdaemon-installer
sudo ./install.sh              # updates binaries and restarts the daemon

Uninstalling the Daemon

# Download the latest installation package and execute uninstall.sh
sudo ./uninstall.sh

Rolling Back the Daemon

# The system is designed to allow roll-back to any previous version
# However, best practice would be to only roll-back one version in the event that a new version was causing issues.
# Download previous version and install
tar xf data-transport-daemon.<distro>-<old-version>.tar.gz
cd dtdaemon-installer
sudo ./install.sh

Configuring the Daemon

The NDTS daemon reads its settings from a simple key/value dat file

Location

/opt/nan-dtdaemon/data/ndtd_configuration.dat

The file may list parameters in any order. Edit with nano or your favorite editor

sudo nano /opt/nan-dtdaemon/data/ndtd_configuration.dat

Changes take effect only after the daemon restarts (see below).

Configuration Parameters

Parameter Default Notes Required
gateway_ip_address - IP address of the on-site NDTS Gateway Yes
gateway_port - TCP port used by the Gateway (usually 60195) Yes
instrument_name - Spectrometer name exactly as entered in the Facility Dashboard Yes
instrument_workstation_uuid - UUID generated for this workstation in the Facility Dashboard Yes
log_level info Six log levels exist with different levels of information:

fatal < error < warning < info < debug < trace (trace is extremely verbose and should only be used when debugging issues as it will fill the disk if left on too long)

No
use_accounting false TopSpin only – set true for TopSpin versions < 4.x No
highest_job_number 8999 Experiments with a higher job number are ignored No

Log levels

Values range from low to extremely high. Note that trace is used for troubleshooting and creates huge log files that will fill the disk if left in trace mode

log level verbosity default
fatal minimal
error low
warning medium
info high yes
debug very high
trace extreme

Example File

gateway_ip_address=155.37.253.192
gateway_port=60195
instrument_name=nmr600
instrument_workstation_uuid=7b20d851-546c-497d-8fad-ef9223b09eab
log_level=info
# use_accounting=true      # (uncomment if needed)
# highest_job_number=9999  # (override default)

Starting the service

The daemon uses SysV service scripts for maximum compatibility and the system is designed to be running at all times. Se

sudo /sbin/service data-transport-daemon start
sudo /sbin/service data-transport-daemon status

If the Daemon configuration file is adjusted the daemon service should be restarted with

sdf

Installed NDTS Files and Directory Structure

All daemon-related files reside under /opt/nan-dtdaemon (except the SysV service script). Knowing where each file lives helps with troubleshooting, backups, and upgrades.

Top-Level Executable and Service Script

Path Purpose
/opt/nan-dtdaemon/data-transport-daemon Main daemon executable. Forks, then exits; detects if another instance is running.
/etc/init.d/data-transport-daemon SysV script used by /sbin/service for start/stop/status and boot-time launch.

User-Interface Scripts

File(s) Role
nan_gui  /  nan_gui.tcl Launch shell + Tcl code for the NDTS Workstation UI.
topspin_finder.sh  /  vnmrj_finder.sh Locate spectrometer software and pull metadata.
tcllib/ Supporting Tcl libraries for the UI.

Version Marker

/opt/nan-dtdaemon/running_workstation_version-X.Y.Z

Filename contains the current daemon version; file body is the daemon start timestamp.

Logs

/opt/nan-dtdaemon/logs/
  • nan-dtdaemon.log – main runtime log
  • ndtd_audit.txt – one line per processed experiment

Data Directory

/opt/nan-dtdaemon/data/
File / Sub-dir Purpose
experiment_addenda.dat Selected user, plus placeholders for sample & project (auto-filled by UI).
ndtd_configuration.dat Key / value daemon configuration file (gateway IP, log_level, etc.).
processing_history.dat Unix timestamps of all acquisitions already handled (read at daemon start).
users_checksum.dat MD5 of last user list; delete to force refresh.
users.dat Current NMRhub user list sent by the Gateway (never edit manually).
user-configuration.dat Per-user defaults: harvesting on/off, change-user permission.
samples/ Cached sample metadata.
projects/ Cached project metadata.
studies/ Cached study metadata.

Spool Directory

/opt/nan-dtdaemon/spool/

Temporary copy of any acquisition that failed to reach the Gateway. Daemon retries each spooled item at every heartbeat until sent.

Summary Diagram

/opt/nan-dtdaemon
├─ data-transport-daemon
├─ nan_gui   ─┐
├─ nan_gui.tcl│ UI layer
├─ topspin_finder.sh│
├─ vnmrj_finder.sh ┘
├─ tcllib/
├─ running_workstation_version-X.Y.Z
├─ logs/
│  ├─ nan-dtdaemon.log
│  └─ ndtd_audit.txt
├─ data/
│  ├─ ndtd_configuration.dat
│  ├─ experiment_addenda.dat
│  ├─ processing_history.dat
│  ├─ users*.dat …
│  ├─ samples/ projects/ studies/
└─ spool/