Best way to close Deepstream via terminal


is there an official terminal command to close deepstream properly/gracefully or is the only option to

sudo pkill -e deepstream


The pipeline should be terminated by set the pipeline state to NULL. There is sample in deepstream-test5 sample.

so there’s no simple command that can be used from terminal and shh, the equivalent of pressing q on the keyboard?


With the implementation of deepstream-test5, you can terminate the app by pressing’q’ on the keyboard. DeepStream is a SDK but not a app. How to terminate an app depends on how you implement the app.

ok sorry for the confusion, what I want to do is:

I can currently stop deepstream running by pressing q on the keyboard

Is there a way to stop it via ssh (terminal) in a similar way? Can I enter a command into terminal to stop deepstream running?

hopefully that makes sense


Do you mean you want to stop deepstream-test5 by pressing ‘q’ key by ssh? I think it works. There is no command control in deepstream-test5. You need to write your own code to implement it. All samples are open source, and they are samples to show how to use deepstream APIs. For other functions which has nothing to do with deepstream, you can implement by yourself.

move you deepstream app to container, so that you can kill deepstream thread over kill container id

1 Like


can use ‘q’ over VNC but not ssh, not in my experience anyway.

I’ll stick to “killing” it and then using a separate .py script to reset the gpio.