ps
filter for Chrome processes running longer than 10 minutes (600s):
ps -e -o pid,etimes,command | awk '{ if ( $2 > 600 && $3 ~ /chrome/) print $0 }'
If the last print $0
is changed to print $1
, it will just show the first column, the PID.
Copied from Nestor U. - https://unix.stackexchange.com/questions/531040/list-processes-that-have-been-running-more-than-2-hours/592472#592472
One liner to find processes that have been running for over 2 hours