kill orphaned httpd processes

December 5, 2011

to kill orphaned httpd processes create a script called killhttpd.sh with the following code

#!/bin/bash
for pid in `ps -C httpd|sed -e 's/^\ \+//g' | grep httpd|awk '{print $1}'`
do
kill $pid
done