| Steve Litt on 19 May 2018 17:42:47 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [PLUG] Zombies: was: Gentoo Shut Down Stalls |
On Thu, 17 May 2018 13:16:12 -0400
Rich Freeman <r-plug@thefreemanclan.net> wrote:
> Other symptoms of this sort of issue include unkillable zombie
> processes, and command line processes that just hang and don't
> respond to ^C when they try to access whatever resource is causing
> the issue (like running commands like mount/umount, df, and so on).
I have something similar which might or might not be apropos. When I
run a CLI program using dmenu, it creates zombies and brings bunches of
programs to a crawl. The following shellscript clears up most or all of
the zombies:
=============================clear_dmenu.sh===========================
#!/bin/sh
rm -f ~/danger.sh
if test -e ~/danger.sh; then
echo Cowardly refusal to continue because ~/danger.sh exists.
echo Delete ~/danger.sh manually.
exit 1
fi
ps axj | /d/bats/clear_dmenu.awk | sort | sed -e"s/..//" > ~/danger.sh
chmod a+x ~/danger.sh
~/danger.sh
====================================================================
=============================clear_dmenu.awk===========================
#!/usr/bin/gawk -We
{
ppid=$1
pid=$2
stat=$7
cmd=$10
#print stat, pid
}
cmd ~ /chromium/{stat = "Tl"}
stat == "Tl"{
print "Z kill -s CONT " pid " # " $10 $11 $12 $13
}
(stat == "T") && (ppid == "1") {
print "A kill -s CONT " pid " # " $10 $11 $12 $13
}
(stat == "T") && (ppid != "1") {
print "A kill -s KILL " pid " # " $10 $11 $12 $13
}
====================================================================
SteveT
Steve Litt
June 2018 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug