Running ntservice as a non-root user is supported under specific conditions.
Conditions for running ntservice as a non-root user
It is possible to run ntservice as a non-root user under certain conditions based on the installation method of Napatech Link-Capture™ Software.
- Installed Link-Capture™ Software with an RPM package: Running ntservice as a non-root user is supported.
- Installed Link-Capture™ Software with the
package_install_3gd.sh script:
- Red Hat Enterprise Linux-based distributions: Running ntservice as a non-root user is not supported when ntservice is installed using the package_install_3gd.sh script and started via ntstart.sh.
- Non-Red Hat Enterprise Linux-based distributions: Running
ntserviceas a non-root user is not supported when started usingntstart.sh. However, it is supported if started via systemd, provided that DKMS is used. See Running ntservice as a service as a non-root user.
The following table summarizes the conditions for supporting ntservice as a non-root user.
| Napatech Link-Capture™ Software installation | Using ntstart.sh | Using systemd |
|---|---|---|
| Installed via RPM. | Supported. | Supported. |
| Installed via the script (Red Hat Enterprise Linux-based distributions). | Not supported. | Not supported. |
| Installed with the script (Non-Red Hat Enterprise Linux-based distributions). | Not supported. | Supported, if DKMS is used. See Running ntservice as a service as a non-root user. |
…
Bus type : PCI Express 0
Link width supported : unknown
Link width negotiated : unknown
Link speed : 2.5 GT/s
Max payload supported : unknown
Max payload negotiated : unknown
Max expected throughput : 230365 MbpsTo ensure that all PCIe parameters are reported correctly, ntservice must be run with root privileges.
Enabling real-time scheduling for ntservice when running as a non‑root user
If ntservice runs as a non-root user, it may not be able to apply a real-time scheduling policy due to insufficient permissions. In this case, ntservice is running in time-sliced mode, which can negatively affect performance. When this issue occurs, the log file typically contains a warning similar to the following:
11/28/25 06:04:20.598677 | 1869 | WARNING | OSS | 38-7b70e74e | Thread 'NT400D11_Mon0' is running timesliced: Failed to use real-time sched policy: code=1: Operation not permitted
Real‑time scheduling policies require the CAP_SYS_NICE capability. When
ntservice is executed without this capability, the system prevents it
from applying the required scheduling policy.
To resolve this issue, grant the CAP_SYS_NICE capability to
ntservice and configure the runtime library path.
-
Run the following command as root to add the
CAP_SYS_NICEcapability.setcap "CAP_SYS_NICE+ep" /opt/napatech3/bin/ntserviceThe capability flags have the following meanings:
+e: Marks the capability as effective (active for the process).+p: Marks the capability as permitted (allowed to be used by the process).
-
Configure the shared library path. When a binary has capabilities set, the
LD_LIBRARY_PATHenvironment variable is ignored. Therefore, the shared library location for ntservice must be registered explicitly. Create a new configuration file and add the library path:echo -e "/opt/napatech3/lib" >> /etc/ld.so.conf.d/ntservice.confUpdate the dynamic linker cache:
ldconfigIf
CAP_SYS_NICEis set but theld.so.conffile is not created, ntservice fails to load its shared libraries. -
Verify the capability settings. To confirm that the capability has been applied correctly, run:
getcap /opt/napatech3/bin/ntserviceAn output example:
/opt/napatech3/bin/ntservice cap_sys_nice=epAfter completing the configuration, restart ntservice to apply the changes.