Sh3ll



Directory :  /scripts2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : //scripts2/kill_gracefull_finishing_apache_process.sh
#!/bin/bash
     
echo "kill gracefully stuck startup of apache childs.. "
     
httpd fullstatus | awk '{print $2,$4}' | grep G | awk '{print $1}' | sort -u | grep "^[0-9]*$" | sort -n | while read -r pida
do
    pidc=$(ps -p $pida -Ocommand | grep http | wc -l)
    if [ $pidc -gt 0 ] ; then
    kill -9 $pida
    echo "killing $pida "
    fi
done
     
echo " "
echo " done."
echo " "

Sh3LL