How run DeepStream 4.0.2 (Jetson) as service

How started deepstream-app as service?
I try start as deepstream-app -c gggg.txt &
but application terminated, if application run as console - it run fine

If you just use &, the process is still tied to the parent (terminal, ssh session, whatever). You can use nohup [link] to get around that. If you want to run deepstream on as a true service, however, it’s probably better to create a systemd .service unit for it.

save something like this as /etc/systemd/system/deepsream.service

Description=My DeepStream Service

Exec=/usr/bin/deepstream-app -c ... (or your deepstream app)
# change someuser to a regular user in the video group. the default is to run as root, which you really do not want for any network connected service.


once you save that file you can start the service with…

systemctl start deepstream

… check it’s status with …

systemctl status deepstream

… and check program output with …

journalctl --unit deepstream

Once you’ve tested it works, you can enable it on startup with:

systemctl enable deepstream

Note that to work like this deepstream can’t have any sinks that require x11, and to save memory you will probably want to disable x with:

systemctl set-default
systemctl isolate

overlaysink does work without x11, however, as do a few others, so you can still play video to hdmi/dp without x11 running. network sinks should work fine.

1 Like