Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

Re: aha!

Richard Pitt
Sat, 03 Oct 1998 12:28:33 -0700

At 09:43 PM 10/2/98 -0700, Geoff Smith wrote:
>
>All right.
>
>After puzzling and puzzling over what was eating up all my hard-drive
>space, I used Vlad's helpful little command "du" to see where the space
>was being taken up. I found 480/580 MB in /var. A little more sleuthing
>found 400/480MB were in /log. My syslog, kern.log, and and debug are all
>over 100MB each! Can I just delete these files, or what should I do???

you can delete them, but you should probably set up a cron task to do it
periodically for you and either archive the files for a few days or simply
delete the file and restart syslogd

You can also edit /etc/syslog.conf to lower the amount of stuff that gets
logged.

We've created a small shell script that does the restart for almost
anything in the /etc/rc.d/init area:

---- cut here ---
#!/bin/sh

name=`basename $0`

usage () {
/bin/echo "Usage: start|stop|restart name"
/bin/echo
/bin/echo "\tWill issue a do /etc/rc.d/init.d/$name[.init] start|stop"
/bin/echo
exit 1
}

[ $# != 1 ] && usage

SERVICE="$1"

if [ -s /etc/rc.d/init.d/$SERVICE.init ] ; then
SERVICE=$SERVICE.init

elif [ ! -s /etc/rc.d/init.d/$SERVICE ] ; then

echo "$name: cannot find /etc/rc.d/init.d/$SERVICE"
exit 1
fi

case $name in
stop|restart) /etc/rc.d/init.d/$SERVICE stop ;;
esac

case $name in
restart)
/bin/echo "Sleeping: ..\c"
sleep 1
/bin/echo "..\c"
sleep 1
/bin/echo
;;
esac

case $name in
start|restart) /etc/rc.d/init.d/$SERVICE start ;;
esac

exit 0

---- cut here ----

richard
-
Richard C. Pitt President/C.E.O.
FirePlug Computers Inc. WWW.FIREPLUG.NET
Voice: 604-644-9265 E-Mail:

Fax: 604-465-2666
Plug and Play Firewalls Internet Facilities and Management