Driver CLI reference
The commands and flags of the synnax-driver program.
The service commands are install, uninstall, start without --standalone, stop,
restart, status, and logs. Run them with admin rights: with sudo on Linux and
macOS, and in an administrator terminal on Windows. On NI Linux Real-Time, log in as
admin, which is root, and leave out sudo in the commands below.
Each command accepts --debug for debug logs and --no-color for logs with no color.
install
Installs the Driver as a service.
sudo synnax-driver install- Linux -> creates the
synnaxsystem user, the environment file/etc/synnax/driver.env, and the systemd servicesynnax-driver. The service runs as thesynnaxuser. It starts with the computer only after you runsudo systemctl enable synnax-driver. The service can use real-time priority and lock memory, andinstallwrites the udev rule/etc/udev/rules.d/99-synnax-driver-latency.rules, so that Arc automations at the High level can keep CPU cores awake.installcopies the binary to/var/lib/synnax-driver/bin/, which thesynnaxuser owns, and makes/usr/local/bin/synnax-drivera link to it. - NI Linux Real-Time -> creates the service
/etc/init.d/synnax-driver, which runs as root and starts with the controller.installcopies the binary to/usr/local/bin, and does not start the service, so runsynnax-driver start. The Driver writes its logs to/var/log/synnax-driver.log. - Windows -> copies the binary to
C:\Program Files\Synnax Driver\and creates the serviceSynnaxDriver, which runs that copy as LocalSystem and starts with the computer. Windows restarts it when it stops with an error. The Driver writes its logs toC:\ProgramData\synnax-driver\logs\driver.log. - macOS -> copies the binary to
/Library/Application Support/synnax-driver/bin/, and creates the launchd servicecom.synnaxlabs.driverin/Library/LaunchDaemonsand the environment file/etc/synnax/driver.env. The service runs that copy as root and starts with the computer. launchd restarts it when it stops with an error. The Driver writes its logs to/Library/Logs/synnax-driver.log.
install does not start the service. When the service already exists, install stops
it first. On Linux, run systemctl enable and start again after you install again. On
Windows and macOS, install also moves the
login of the user to the
service.
login
Asks for the address of the Core, the username, and the password. It creates a rack for the Driver and an API key for that rack, and saves only the key in the state file.
sudo synnax-driver loginHost [localhost]: 10.0.0.45
Port [9090]:
Secure (Y/N) [N]:
Username: driver
Password:Run login with admin rights, so that the service reads the login. On Linux, and on
macOS while the service is installed, login also reads the
environment file, which
only root can read. Restart a running Driver to use the new key.
start
Starts the service:
sudo synnax-driver startWith --standalone, runs the Driver in the terminal instead:
synnax-driver start --standaloneThe flags below apply only with --standalone. --standalone, --disable-sig-stop,
and --disable-stdin-stop take no value: they turn on when they are present. The other
flags take a value, as --port 9091 or --port=9091. For a boolean value, use true
or false.
--standalone,-s= falseRun the Driver in the terminal, not as a service.
--disable-sig-stop= falseKeep the Driver running when it gets SIGINT or SIGTERM.
--disable-stdin-stop= falseDo not stop the Driver when you type
STOPin the terminal. Use this flag when the Driver runs with no terminal.--configThe path of a configuration file.
--state-fileThe path of the state file. The default depends on the operating system. See State file.
--host= localhostThe host of the Core.
--port= 9090The port of the Core.
--api-key= ""The API key of the Driver’s rack. The Driver logs in as that rack.
--username= synnaxThe username to log in with once, to create a rack and its API key. Ignored when an API key is set.
--password= seldonThe password to log in with once, to create a rack and its API key. Ignored when an API key is set.
--secure= falseConnect to the Core over TLS. Takes a value:
--secure true.--correct-skew= trueKeep the timestamps of hardware-timed NI and LabJack reads in step with the clock of the computer. Takes a value.
--op-timeout= 60The number of seconds after which a task operation that has not finished gives the task the error
operation timed out.--poll-interval= 1The number of seconds between two checks for task operations that have not finished.
--shutdown-timeout= 30The number of seconds that the Driver waits for task operations when it stops.
--worker-count= 4The number of threads that run task operations, from 1 to 64.
--enable-integrationsIntegrations to add, separated by commas:
arc,ethercat,http,labjack,modbus,ni, oropc.--disable-integrationsIntegrations to remove, separated by commas. For example,
--disable-integrations ni,labjack.
The service ignores these flags. To configure the service, see Configure a standalone Driver.
stop
Stops the service.
sudo synnax-driver stoprestart
Stops and starts the service. Run it after login, or after you edit the environment
file.
sudo synnax-driver restartstatus
Shows whether the service runs.
synnax-driver status- Linux -> prints the output of
systemctl status synnax-driver. When the service does not run, the command fails withService is not running. - NI Linux Real-Time and Windows -> prints
Synnax Driver is running (PID: 28191), orSynnax Driver is not running. - macOS -> prints the output of
launchctl print system/com.synnaxlabs.driver.
logs
Shows the logs of the service, and the new logs as they come, until you press Ctrl+C.
synnax-driver logsOn Linux, the command runs journalctl -fu synnax-driver. On NI Linux Real-Time,
Windows, and macOS, it shows the log file that install names.
clear
Deletes the saved connection parameters and API key from the state file. Run login
again before the next start.
sudo synnax-driver clearuninstall
Removes the service.
sudo synnax-driver uninstallOn Linux, Windows, and macOS, uninstall stops the service first. On Linux, it also
removes the udev rule. On NI Linux Real-Time, it does not stop the service, so run
synnax-driver stop before uninstall. The binary, the synnax user, the environment
file, and the state file stay on the computer.
version
Prints the version of the Driver.
synnax-driver version