&daemon;

nvme-stas
Mr Martin Belanger
Dell, Inc.
&daemon; 8
&daemon; &deamondesc;
`&daemon;` OPTIONS

## Description

`&daemon;` is a system daemon that can be used to automatically locate and connect to NVMe-oF Discovery Controllers using mDNS service discovery. It can also be manually configured with &daemon;.conf 5 to connect to Discovery Controllers that cannot be located using mDNS.

## Options

The following options are understood:

`-fFILE`
`--conf-file=FILE`

  Specify a different configuration file than &daemon;.conf 5 (default: `/etc/stas/&daemon;.conf`).

`-s`
`--syslog`

  Send messages to syslog instead of stdout. Use this when running &daemon; as a daemon. (default: `false`).

`--tron`

  Trace ON. (default: `false`)

`--idl=FILE`

  Print D-Bus IDL to FILE and exit.

## Exit status

On success, 0 is returned, a non-zero failure code otherwise.

## Daemonization

&daemon; is managed by `systemd`. The following operations are supported:

Command | Description
--- | ---
    $ systemctl start &daemon;
| Start daemon.
    $ systemctl stop &daemon;
| Stop daemon. The `SIGTERM` signal is used to tell the daemon to stop.
    $ systemctl restart &daemon;
| Effectively a `stop` + `start`.
    $ systemctl reload &daemon;
| Reload configuration. This is done in real time without restarting the daemon. The `SIGHUP` signal is used to tell the daemon to reload its configuration file. Note that configuration parameters that affect connections (e.g. `kato`), will not apply to existing connections. Only connections established after the configuration was changed will utilize the new configuration parameters.

## Design

`&daemon;` use the `GLib` main loop. The `GLib` Python module provides several low-level building blocks that `&daemon;` requires. In addition, many Python modules "play nice" with `GLib` such as `dasbus` (D-Bus package) and `pyudev` (UDev package). `GLib` also provides additional components such as timers, signal handlers, and much more.

`&daemon;` connects to the `avahi-daemon` using D-Bus. The `avahi-daemon`, or simply Avahi, is an mDNS discovery service used for zero-configuration networking (zeroconf). `&daemon;` registers with Avahi to automatically locate Central Discovery Controllers (CDC) and Direct Discovery Controllers (DDC). When Avahi finds Discovery Controllers (DC), it notifies `&daemon;` which connects to the DC with the help of the `libnvme` library. Once a connection to a DC is established, `&daemon;` can retrieve the discovery log pages from that DC and cache them in memory.

## Configuration

`&daemon;` can automatically locate discovery controllers (DC) with the help of Avahi and connect to them. However, `&daemon;` can also operate in a non-automatic mode based on manually entered configuration. In other words, DCs can be entered in a configuration named `/etc/stas/&daemon;.conf`. This configuration file also provides additional parameters, such as log-level attributes used for debugging purposes.

## D-Bus API

The interface to `&daemon;` is D-Bus. This allows other programs, such as `&control;`, to communicate with `&daemon;`. The D-Bus address is `org.nvmexpress.staf`.

## See Also

&daemon;.conf 5 , &daemon;.service 8 , stafctl 1 , org.nvmexpress.staf 5 .