I need to know which processes are running more than 6 hours in UNIX. How can I find those out?
migrated from serverfault.com Sep 13 '13 at 19:42
This question came from our site for professional system and network administrators.
Depending on what you have available the general approach might be:
and run a for loop over the results using something like:
to convert the date to a UNIX timestamp. From there something like:
should give you the number of seconds that the process has been running. converting to hours is then trivial.
The short and long is that you will end up writing a script.
You can use following function to Get Process elapse time in minutes