[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting free disk space by percentage?
From: |
Bas van der Vlies |
Subject: |
Re: Detecting free disk space by percentage? |
Date: |
Fri, 12 Apr 2002 08:31:48 +0100 (MET DST) |
On 11-Apr-2002 Hugo Gayosso wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> basv@sara.nl (Bas van der Vlies) writes:
>
>> I had the same problem. I solved it by creating a directory beneath
>> /home, namely cfengine and then it works. I know it is a ugly
>> construction and i think it is a bug! You must also set some
>> cfengine variables else cfengine thinks it is not a 'sensible' directory.
>>
>> /home/cfengine freespace=10%
>
> [...]
>
> Thanks!, some comments, though:
>
> I tried it and it almost work, I think it is a bug too
> because even if you are checking inside that directory, it doesn't
> change the fact that is "mounted" per cfengine definitions.
>
>
> Now, I say it almost work, because I tried setting:
>
> sensiblesize = ( 0 )
> sensiblecount = ( 0 )
>
> but, sensiblecount has to be ' > 0 ' (per install.c)
>
> case cfscount:
> sscanf(value,"%d",&number);
> if (number > 0)
> {
> SENSIBLEFILECOUNT = number;
> }
> else
> {
> yyerror("Silly value for sensiblecount (must be positive
> integer)");
> }
>
> break;
>
>
> so if I just create the directory, but don't place any
> files/directories inside it, it won't be sensible for cfengine.
>
> cfengine:myhost: Filesystem /home/.cfengine_freespace has only 0
> files/directories.
> cfengine:myhost: The file /home/.cfengine_freespace does not exist or is
> suspicious.
>
>
> Did you changed the source code to fix this?
>
I use the same solution as you have discovered.I put one file in the
directoryto overcome this. So for every filesystem that i checked on freespace
i must create a directory and one file in it!! This is not desirable.
Regards
--
********************************************************************
* *
* Bas van der Vlies e-mail: basv@sara.nl *
* SARA - Academic Computing Services phone: +31 20 592 8012 *
* Kruislaan 415 fax: +31 20 6683167 *
* 1098 SJ Amsterdam WWW: www.sara.nl *
* *
********************************************************************