Please share command to find any script which is running for more than say 30 minutes. in Linux System
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
migrated from stackoverflow.com Jan 15 at 8:50
|
the 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. |
|||
|
|