--On Tuesday, October 15, 2002 16:13:38 +0200 Per Einar Ellefsen <[EMAIL PROTECTED]> wrote:

At 11:46 15.10.2002, Eric Cholet wrote:
--On Monday, October 14, 2002 16:14:21 +0200 Eric Cholet
<[EMAIL PROTECTED]> wrote:

--On Monday, October 14, 2002 16:08:07 +0200 Per Einar Ellefsen
<[EMAIL PROTECTED]> wrote:

I suppose we could just bump the script up from 95% to, say, 98%.  The
site is only about 120M and there's 650MB of free disk space.  Cutting
it a bit close, I suppose...

So long as we're not in an immediate hurry to get something published, I prefer to wait out for the server being fixed.

+1 (for not changing anything yet)

Another thought: checking for a percentage of the disk capacity doesn't seem to be relevant here. Perhaps we should be checking for an absolute amount, say a few hundred megs. Of course we'd need to keep an eye on that figure as the site grows.

I just replaced the fs_is_full sub with this:

sub fs_is_full {
     # get available disk space
     my $disk = qx{ df | grep /x2 };
     my ($disk_avail) = ($disk =~ /(\d+)\s+\d+\%/); # avail is before
capacity      # get size of site
     my $site = qx{ du -c $rel | grep total };
     my ($site_size) = ($site =~ /^(\d+)/);

     # print "site_size = $site_size , disk_avail = $disk_avail";

     # give us a margin of 50MB
     return $site_size + 50*1024 > $disk_avail ? 1 : 0;

}

It seems to work ok, but I'm wondering if my df/du knowledge is a little
limited... It reports 28M for dst_html, which seems a little small, no?

no, it seems correct to me:

[EMAIL PROTECTED]:/home/perlwww/apache.org/modperl-docs/dst_html% du -ks .
28389   .



-- Per Einar Ellefsen [EMAIL PROTECTED]




-- Eric Cholet


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to