Please share command to find any script which is running for more than say 30 minutes. in Linux System
migrated from stackoverflow.com Jan 15 at 8:50
the following bash script will output the PIDs of processes that have been running for longer than 30 minutes.
Assuming GNU date + ps, this gives you a list of pids older than 30 minutes:
On linux, you can then check whether /proc/$pid/exe resolves to a known interpreter like /bin/sh, /bin/bash or /usr/bin/python - if so, you know it's a script.