[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting free disk space by percentage?
From: |
Hugo Gayosso |
Subject: |
Re: Detecting free disk space by percentage? |
Date: |
11 Apr 2002 10:57:59 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
-----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?
The other option is to put some stuff inside the directory (I used
'copy' to put a file there), that way cfengine is satisfied, but if
you want to check a lot of filesystems, then you have to do this for
each one, and your config file grows a lot, I tried using iterating
over a list (i.e. var = (home:tmp:usr)) , but it doesn't work for all
the commands involved in this operation (i.e. directories, copy,
disks).
Thanks for your help.
Greetings,
- --
Hugo Gayosso
Support the Free Software Movement!
GNU Project <http://www.gnu.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8taR3x2JZtTN6co8RAivmAKDTDi2HUtOcyhCCCjIjf0Q3oLrGugCfQ+Cs
yedr7snbZ5nJMNrOCvCz7Dw=
=YF2L
-----END PGP SIGNATURE-----