List processes that have been running more than 2 hours
7
votes
2
answers
13044
views
How can I list processes, with a defined name, that have been running for more than 2 hours. This is what I have tried.
ps -efo pid,comm,etime | grep 'process name' | awk '{print $3}'
----
This is for Solaris.
Or can someone help how to create a script that will send an email with the process IDs if there are processes running longer than 2 hours.
Asked by Vinod
(71 rep)
Jul 19, 2019, 02:50 PM
Last activity: Jun 7, 2022, 10:55 AM
Last activity: Jun 7, 2022, 10:55 AM