NDTS Daemon Installation: Difference between revisions
Mmaciejewski (talk | contribs) No edit summary |
Mmaciejewski (talk | contribs) No edit summary |
||
Line 109: | Line 109: | ||
* Audit of processed experiments: <pre>/opt/nan-dtdaemon/logs/ndtd_audit.txt</pre> | * Audit of processed experiments: <pre>/opt/nan-dtdaemon/logs/ndtd_audit.txt</pre> | ||
== ''' | = Components of the NDTS Daemon Installation = | ||
All daemon-related files reside under <code>/opt/nan-dtdaemon</code> (except the SysV service script). | |||
Knowing where each file lives helps with troubleshooting, backups, and upgrades. | |||
== '''Top-Level Executable and Service Script''' == | |||
{| class="wikitable" | |||
! Path !! Purpose | |||
|- | |||
| <code>/opt/nan-dtdaemon/data-transport-daemon</code> || Main daemon executable. Forks, then exits; detects if another instance is running. | |||
|- | |||
| <code>/etc/init.d/data-transport-daemon</code> || SysV script used by <code>/sbin/service</code> for start/stop/status and boot-time launch. | |||
|} | |||
== '''User-Interface Scripts''' == | |||
{| class="wikitable" | |||
! File(s) !! Role | |||
|- | |||
| <code>nan_gui</code> / <code>nan_gui.tcl</code> || Launch shell + Tcl code for the NDTS Workstation UI. | |||
|- | |||
| <code>topspin_finder.sh</code> / <code>vnmrj_finder.sh</code> || Locate spectrometer software and pull metadata. | |||
|- | |||
| <code>tcllib/</code> || Supporting Tcl libraries for the UI. | |||
|} | |||
== '''Version Marker''' == | |||
<pre>/opt/nan-dtdaemon/running_workstation_version-X.Y.Z</pre> | |||
Filename contains the current daemon version; file body is the daemon start timestamp. | |||
== '''Logs''' == | |||
<pre>/opt/nan-dtdaemon/logs/</pre> | |||
* <code>nan-dtdaemon.log</code> – main runtime log | |||
* <code>ndtd_audit.txt</code> – one line per processed experiment | |||
== '''Data Directory''' == | |||
<pre>/opt/nan-dtdaemon/data/</pre> | |||
{| class="wikitable" | |||
! File / Sub-dir !! Purpose | |||
|- | |||
| <code>experiment_addenda.dat</code> || Selected user, plus placeholders for sample & project (auto-filled by UI). | |||
|- | |||
| <code>ndtd_configuration.dat</code> || Key = value daemon configuration (gateway IP, log_level, etc.). | |||
|- | |||
| <code>processing_history.dat</code> || Unix timestamps of all acquisitions already handled (read at daemon start). | |||
|- | |||
| <code>users_checksum.dat</code> || MD5 of last user list; delete to force refresh. | |||
|- | |||
| <code>users.dat</code> || Current NMRhub user list sent by the Gateway (never edit manually). | |||
|- | |||
| <code>user-configuration.dat</code> || Per-user defaults: harvesting on/off, change-user permission. | |||
|- | |||
| <code>samples/</code> || Cached sample metadata. | |||
|- | |||
| <code>projects/</code> || Cached project metadata. | |||
|- | |||
| <code>studies/</code> || Cached study metadata. | |||
|} | |||
== '''Spool Directory''' == | |||
<pre>/opt/nan-dtdaemon/spool/</pre> | |||
Temporary copy of any acquisition that failed to reach the Gateway. | |||
Daemon retries each spooled item at every heartbeat until sent. | |||
== '''Summary Diagram''' == | |||
<pre> | |||
/opt/nan-dtdaemon | |||
├─ data-transport-daemon ← executable | |||
├─ nan_gui ─┐ | |||
├─ nan_gui.tcl│ UI layer | |||
├─ topspin_finder.sh│ | |||
├─ vnmrj_finder.sh ┘ | |||
├─ tcllib/ ← Tcl support | |||
├─ 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/ ← unsent acquisitions | |||
</pre> | |||
Refer back to [[Running and Monitoring the Daemon]] for log locations and service commands. |
Revision as of 13:51, 3 June 2025
Daemon Installation (Workstation)
Prerequisites
- Gateway IP address
- Exact Instrument Name (set in the Facility Dashboard – no spaces)
- 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).
Required Parameters (no defaults)
Parameter | Purpose |
---|---|
gateway_ip_address | IP address of the on-site NDTS Gateway |
gateway_port | TCP port used by the Gateway (usually 60195) |
instrument_name | Spectrometer name exactly as entered in the Facility Dashboard |
instrument_workstation_uuid | UUID generated for this workstation in the Facility Dashboard |
Optional Parameters
Parameter | Default | Notes |
---|---|---|
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) |
use_accounting | false | TopSpin only – set true for TopSpin versions < 4.x |
highest_job_number | 8999 | Experiments with a higher job number are ignored |
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)
Managing the Daemon Service
The daemon uses SysV service scripts for maximum compatibility
The system is designed to be running at all times. The NDTS GUI may be used to turn off data harvesting when needed. If the daemon must be existed, use the stop command below.
Note that starting the daemon while it is running will not start a new instance and will not cause issues.
sudo /sbin/service data-transport-daemon start sudo /sbin/service data-transport-daemon stop sudo /sbin/service data-transport-daemon restart sudo /sbin/service data-transport-daemon status
After adjusting the Daemon configuration file restart the daemon and verify the status
sudo /sbin/service data-transport-daemon restart sudo /sbin/service data-transport-daemon status
Log Files
- Daemon log:
/opt/nan-dtdaemon/logs/nan-dtdaemon.log
- Audit of processed experiments:
/opt/nan-dtdaemon/logs/ndtd_audit.txt
Components of the NDTS Daemon Installation
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 logndtd_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 (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 ← executable ├─ nan_gui ─┐ ├─ nan_gui.tcl│ UI layer ├─ topspin_finder.sh│ ├─ vnmrj_finder.sh ┘ ├─ tcllib/ ← Tcl support ├─ 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/ ← unsent acquisitions
Refer back to Running and Monitoring the Daemon for log locations and service commands.