7300 uucp trouble with setgetty!
Scot E. Wilcoxon
sewilco at datapg.DataPg.MN.ORG
Fri Apr 8 13:05:09 AEST 1988
In article <120 at slbtoy.UUCP> slb at slbtoy.UUCP (Sanford L. Barr) writes:
>...
> The uucico process spawns a "getoff.sh" which then calls
>"setgetty". The setgetty process seems to just hang in mid air. If I
>...
Setgetty has been hanging several times a week here. I had to make a
daemon which kills any setgetty which has used "too much" CPU time.
In crontab:
6 * * * * /bin/su root -c "/usr/local/bin/setg.clean" > /dev/null
And what does the work (should use setgetty, but it has no documentation):
# Test for a setgetty with a lot of CPU, kill it, and fix inittab
SETGLINE=`ps -ef | fgrep setgetty`
if [ -n "$SETGLINE" ]
then
CPTIME=`expr "$SETGLINE" : '.*:..:.. ... \(.*\):.. setgetty'`
if [ ${CPTIME:-0} -gt 9 ]
then
echo $SETGLINE | mail root
PROCID=`expr "$SETGLINE" : '^....... \(.....\) '`
kill -9 $PROCID
sleep 5
cp /etc/inittab /etc/inittab.new
sed -e '/^:ph1/s/^:/ /' /etc/inittab >/etc/inittab.new
mv /etc/inittab.new /etc/inittab
sleep 15
telinit q
fi
fi
--
Scot E. Wilcoxon sewilco at DataPg.MN.ORG {amdahl|hpda}!bungia!datapg!sewilco
Data Progress UNIX consulting +1 612-825-2607 uunet!datapg!sewilco
More information about the Unix-pc.general
mailing list