[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] root login failure and /var at 100%
- Subject: Re: [cobalt-users] root login failure and /var at 100%
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Fri Nov 2 05:32:01 2001
- Organization: Befriend Internet Services LLC
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
"Brent Sims" <bs@xxxxxxxxxxx> wrote:
> There's a very easy way to keep on top of things in order to
> avoid the full directory problem. Simply create a shell script that
> does a df every day and run it from cron - the server admin will get
> a report each day of the disk usage:
>
> #!/bin/sh
> echo "Disk Usage Report"
> echo " "
> /bin/df -h
> echo " "
> exit
>
> Just open a file named something like disk_usage.sh in vi or
> pico. Enter the above listed 6 lines, save the file, make it
> executable (chmod +x disk_usage.sh) and set up a crontab to run it.
For those that want to take it a step farther, you can add lines to the
script that check the % usage for the /var partition and delete or move a
specified file (or files) if the partition's usage is above a certain
threshold.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/