- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Killing Zombies through scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 10:28 AM
07-19-2004 10:28 AM
L class server
Is there a way you can kill zombie processes without restarting the system? I was thinking about creating a shell script that finds the
ps -f |grep
Any suggestions?
Thanks,
Doug
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 11:01 AM
07-19-2004 11:01 AM
Re: Killing Zombies through scripts
The term zombie process is derived affectionately based on the same concept of bodies which can not die. So, the short answer to your question is no. There is no way to kill a zombie process in short of a reboot.
Having said that, not all
If you are having issues with too many zombie processes are hanging around, you may need to get to the bottom of the problem and talke to the developers of the software running on your system if it is internal or call the vendor and ask for their suggestion if this is a package purchased form them.
Sorry to be the bearer of the bad news.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 11:18 AM
07-19-2004 11:18 AM
Re: Killing Zombies through scripts
As stated you *CAN'T* kill a zombie - BECAUSE THEY'RE ALREADY DEAD!!!!
That being said - IF they've been inherited - as a parent by init - PID #1 - then it has routines to reap it's children periodically.
IF they still have the org parent PID, then someone - in development - needs to go back to coding school. That's just lazy, lousy programming - period. In that case a stout hickory handle seems to work best for me.....
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 08:23 PM
07-20-2004 08:23 PM
Solution#!/bin/ksh
# --------------------------------------------------------------------------
# Fichier : Exp_KillPsDefunct.sh
# Action : Suppresion des process zombies
# Entree :
# Sortie :
# Usage :
# --------------------------------------------------------------------------
# Maintenance
# Date Auteur Action
# --------------------------------------------------------------------------
# 13/07/2004 TPA Creation
# --------------------------------------------------------------------------
#set -x
L_FicLst=/tmp/exploit/tmp/Exp_KillPsDefunct.txt
L_FicShell=/tmp/exploit/tmp/Exp_KillPsDefunct.sh
L_FicLog=/tmp/exploit/log/Exp_KillPsDefunct.log
# -- Raz
cat /dev/null > ${L_FicLst}
cat /dev/null > ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
L_NbPs=`ps -ef |grep defunct|grep -v grep |wc -l`
echo "Nombre de process defunct : ${L_NbPs}">> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
echo "- Action : `date +%H:%M:%S` : Constitution de la liste des process" >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
ps -ef |grep defunct|grep -v grep > ${L_FicLst}
cat ${L_FicLst} >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
echo "- Action : `date +%H:%M:%S` : Constitution du shell" >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
cat ${L_FicLst} |awk '{printf "kill -9 " $2 "\n"}' > ${L_FicShell}
cat ${L_FicShell} >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
echo "- Action : `date +%H:%M:%S` : Constitution du shell" >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
chmod 777 ${L_FicShell}
${L_FicShell} >> ${L_FicLog}
echo " -----------------------------------------------------------------" >> ${L_FicLog}
L_NbPs=`ps -ef |grep defunct|grep -v grep |wc -l`
echo "Nombre de process defunct : ${L_NbPs}">> ${L_FicLog}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 09:06 PM
07-20-2004 09:06 PM
Re: Killing Zombies through scripts
If it is not removed until the system reboot. moreover it will have resource.
It have little effect using kill command.
This is normal state. When the processor halt, it will remain in defunct state. But it occupy little space than address territory.
If you sent signal to processor, which is already halt, you cannot have an influence on it. this proccessor will remove when the proccessor stop, and it will remain defunct processor until system reboot.
For more information refer to 'kill' and 'wait' man page.
And if you want to know system's cpu consumption use this command.
# UNIX95= ps -e -o "user,pcpu,args" | sort -rnk2 | more
Aagin And this problem may solve to upgrade support plus in lastest version.
download site is below.
http://www2.itrc.hp.com/service/patch/releaseIndexPage.do?BC=patch.breadcrumb.main
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2004 12:39 AM
07-21-2004 12:39 AM
Re: Killing Zombies through scripts
logfile=/tmp/killzombies.log
for i in `ps -el|grep -v SZ|grep Z|awk '{print $5}'`
do
ps -ef|grep -v grep|grep ${i} >>$logfile 2>&1
kill -18 ${i}
done
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2004 12:57 AM
07-21-2004 12:57 AM