NDTS Daemon Installation: Difference between revisions
No edit summary |
Mmaciejewski (talk | contribs) |
||
Line 156: | Line 156: | ||
</pre> | </pre> | ||
If the Daemon configuration file is adjusted the daemon service should be restarted with <pre>sudo /sbin/service data-transport-daemon status</pre> | If the Daemon configuration file is adjusted the daemon service should be restarted with <pre>sudo /sbin/service data-transport-daemon status</pre> | ||
=== Starting the Service === | |||
The daemon uses SysV service scripts for maximum compatibility, though most modern systems now use <code>systemd</code>. The system is designed to run at all times. See the [[NDTS Daemon Operation|NDTS Daemon Operation guide]] for more information on running and monitoring the Daemon. | |||
If your system uses traditional init scripts: | |||
<pre> | |||
sudo /sbin/service data-transport-daemon start | |||
sudo /sbin/service data-transport-daemon status | |||
sudo /sbin/service data-transport-daemon restart | |||
</pre> | |||
If your system uses systemd: | |||
<pre> | |||
sudo systemctl start data-transport-daemon | |||
sudo systemctl status data-transport-daemon | |||
sudo systemctl restart data-transport-daemon | |||
</pre> | |||
=== Determining Which Command to Use === | |||
To check which command is available on your system, you can run: | |||
<pre> | |||
command -v systemctl && echo "Use systemctl" || echo "Use service" | |||
</pre> | |||
=== Init System by OS Version === | |||
{| class="wikitable sortable" | |||
! Distribution !! OS Version(s) !! Init System !! Command to Use | |||
|- | |||
| Red Hat Enterprise Linux || RHEL 5, RHEL 6 || SysV Init || <code>service</code> | |||
|- | |||
| Red Hat Enterprise Linux || RHEL 7 and later || systemd || <code>systemctl</code> | |||
|- | |||
| CentOS || CentOS 5, CentOS 6 || SysV Init || <code>service</code> | |||
|- | |||
| CentOS || CentOS 7, CentOS 8 || systemd || <code>systemctl</code> | |||
|- | |||
| Ubuntu || ≤ 14.10 || Upstart/SysV Init || <code>service</code> | |||
|- | |||
| Ubuntu || 15.04 and later || systemd || <code>systemctl</code> | |||
|- | |||
| AlmaLinux || AlmaLinux 8 and later || systemd || <code>systemctl</code> | |||
|} | |||
== Installed NDTS Files and Directory Structure == | == Installed NDTS Files and Directory Structure == |
Revision as of 23:23, 22 June 2025
- NAN Data Transport System
- NDTS Overview
- NDTS Installation
- TopSpin 3.x Requirement
- Managing, Monitoring, and Logging
- NDTS Usage Guides
NDTS Daemon & GUI Installation (Spectrometer Workstation)
The NDTS Daemon and GUI must be installed separately on each NAN connected spectrometer
Prerequisites
- Gateway IP address
- The spectrometer workstation must be able to connect to the Gateway IP address on TCP port 60195
- 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.
Alma Linux 9.6 - Creating systemctl capability
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
Installation and Update Examples
NDTS Daemon and GUI Install Example
NDTS Daemon and GUI Update Example
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 |
NOTE: use_accounting=true
must be set for versions of TopSpin prior to 4.x
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. See the NDTS Daemon Operation guide for more information on running and monitoring the Daemon
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
sudo /sbin/service data-transport-daemon status
Starting the Service
The daemon uses SysV service scripts for maximum compatibility, though most modern systems now use systemd
. The system is designed to run at all times. See the NDTS Daemon Operation guide for more information on running and monitoring the Daemon.
If your system uses traditional init scripts:
sudo /sbin/service data-transport-daemon start sudo /sbin/service data-transport-daemon status sudo /sbin/service data-transport-daemon restart
If your system uses systemd:
sudo systemctl start data-transport-daemon sudo systemctl status data-transport-daemon sudo systemctl restart data-transport-daemon
Determining Which Command to Use
To check which command is available on your system, you can run:
command -v systemctl && echo "Use systemctl" || echo "Use service"
Init System by OS Version
Distribution | OS Version(s) | Init System | Command to Use |
---|---|---|---|
Red Hat Enterprise Linux | RHEL 5, RHEL 6 | SysV Init | service
|
Red Hat Enterprise Linux | RHEL 7 and later | systemd | systemctl
|
CentOS | CentOS 5, CentOS 6 | SysV Init | service
|
CentOS | CentOS 7, CentOS 8 | systemd | systemctl
|
Ubuntu | ≤ 14.10 | Upstart/SysV Init | service
|
Ubuntu | 15.04 and later | systemd | systemctl
|
AlmaLinux | AlmaLinux 8 and later | systemd | systemctl
|
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 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 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/