[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/etc/daily problem, plus high load averages..
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: /etc/daily problem, plus high load averages..
- From: Colin Leath <cleath_(_at_)_experienceartist_(_dot_)_com>
- Date: Sat, 14 Oct 2000 18:56:33 -0700 (PDT)
I thought it was unusual to see load averages > 1 (actually in the 5-8
range), but I didn't notice any performance problem so I wasn't moved to
do anything about it.
Then I noticed that I hadn't received daily output or daily insecurity
output for four days (I've now changed things so I will notice sooner).
I tried running /usr/bin/sh /etc/daily,
but it would hang during the execution of netstat, or just after.
I started killing off the old processes related to the hung /etc/daily
script. Then I found this:
8592 p2 RN 3774:56.54 more
along with a 'more .cshrc' process that had been running for about as
long.
killing this process allowed the update db process to finish...
I think it was actually the updatedb script that was hanging because I
noticed a 'nice -5 su -m nobody' listed in the processes.
I've included relevant parts of my /etc/daily below. I modified it to
update the locate db daily.
If anyone can provide further insight into this problem, as well as
suggest how to avoid or prevent occurrences like that 'more' process
above, please let me know.
Thanks,
Colin
echo ""
echo "network:"
netstat -iv
echo ""
t=/var/rwho/*
if [ "$t" != '/var/rwho/*' ]; then
echo ""
ruptime
fi
# If CHECKFILESYSTEMS is set to 1 in the environment, run fsck
# with the no-write flag.
[ "X$CHECKFILESYSTEMS" = X1 ] && {
echo ""
echo "Checking filesystems:"
fsck -n | grep -v '^\*\* Phase'
}
if [ -f /etc/Distfile ]; then
echo ""
echo "Running rdist:"
if [ -d /var/log/rdist ]; then
logf=`date +%Y.%b.%e`
rdist -f /etc/Distfile 2>&1 | tee /var/log/rdist/$logf
else
rdist -f /etc/Distfile
fi
fi
echo ""
if [ -f /var/db/locate.database ]; then
TMP=`mktemp /var/db/locate.database.XXXXXX`
if [ $? -eq 0 ]; then
trap 'rm -f $TMP' 0 1 15
echo "Rebuilding locate database:"
UPDATEDB="/usr/libexec/locate.updatedb"
echo "${UPDATEDB} --fcodes=- --tmpdir=${TMPDIR:-/tmp}" | \
nice -5 su -m nobody 2>/dev/null 1>$TMP
if [ -s "$TMP" ]; then
chmod 444 $TMP
chown root.wheel $TMP
mv -f $TMP /var/db/locate.database
else
echo "Not installing locate database; zero size"
fi
else
echo "Not rebuilding locate database; can't create temp file"
fi
else
echo "Not rebuilding locate database; no /var/db/locate.database"
fi
sh /etc/security 2>&1 | mail -s "$host daily insecurity output" root
Visit your host, monkey.org