I'm currently trying to find out how many of these processes have been running for more than 30 minutes

ps -ef | grep ffmpeg | wc -l

Not tested, but I would try something like

ps -eocomm=,etimes= | awk '$1 ~ /ffmpeg/ && $2 > 1800 {c++} END {print c}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.