Answer the question
In order to leave comments, you need to log in
Kill processes by cron that hang in httpd for more than 60 seconds?
Hello, I need to kill processes that hang for more than 60 seconds in httpd
there is a script, but it only kills that hang for more than an hour
#!/bin/bash
PIDS="`ps eaxo etime,pid,comm | egrep "httpd" | grep -v "00:" | awk '{print $2}'`"
echo "httpd processes running more than one hour..."
for i in ${PIDS}; do { echo "Killing $i"; kill -9 $i; }; done;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question