ntservice can be managed by systemd including starting ntservice on boot.
Running ntservice as a service as a root user
After the Napatech Link-Capture™ Software installation is complete, it is possible to enable ntservice as a service via systemd.
Create a file named ntservice.service and include the following
properties:
[Unit] Description=Napatech 3GD Service [Service] Type=forking GuessMainPID=yes User=root Group=root RuntimeDirectory=root RuntimeDirectoryMode=775 RuntimeDirectoryPreserve=yes ExecStart=/opt/napatech3/bin/ntstart.sh --managed ExecStop=/opt/napatech3/bin/ntstop.sh --managed TimeoutStartSec=0 TimeoutStopSec=0 Restart=on-abnormal SuccessExitStatus=0 1 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.targetPlace the file in the following directory.
/etc/systemd/system/Run these commands.
systemctl daemon-reload systemctl enable ntserviceThe first command reloads the systemd configuration, and the second command enables ntservice as a service. For the first time, you can start or stop the service as follows:
systemctl start ntservice systemctl stop ntservicentservice is enabled by default in the subsequent reboots.
Running ntservice as a service as a non-root user
Add EPEL as described here: https://docs.fedoraproject.org/en-US/epel/.
Install DKMS. For example:
dnf update dnf install dkms
Install Napatech Link-Capture™ Software. See Compile and Install the Linux Driver and the Tools.
Build and install the driver using DKMS. For
example:
export PACKAGE_VERSION=$(cat /opt/napatech3/driver/src/driver/VERSION) cp -r /opt/napatech3/driver/src /usr/src/ntdrv-${PACKAGE_VERSION} cp /opt/napatech3/examples/integration/dkms/dkms.conf /usr/src/ntdrv-${PACKAGE_VERSION}/ dkms build ntdrv/${PACKAGE_VERSION} dkms install ntdrv/${PACKAGE_VERSION} cp /opt/napatech3/exampels/integration/modules-load.d/nt3gd.conf /etc/modules-load.d/nt3gd.conf
Copy files for systemd as
follows.
cp -r /opt/napatech3/examples/integration/sysusers.d /etc cp -r /opt/napatech3/examples/integration/systemd/ntservice.service /etc/systemd/system/
Run these
commands.
systemctl daemon-reload systemctl enable ntserviceThe first command reloads the systemd configuration, and the second command enables ntservice as a service. For the first time, you can start or stop the service as follows:
systemctl start ntservice systemctl stop ntservicentservice is enabled by default in the subsequent reboots. For the systemd setup files and instructions, see systemd integration in DN-0449.
Note: This procedure needs to be repeated after upgrading the
kernel to a newer version.