Can you publish what formula you use to calculate percentage free for UNC?
Using linux RMA we get a discrepency on Debian based system. e.g.:
OS says:
9.1G 7.2G 1.5G 84% /var
Where 84% is amount used
HM says:
Reply: 21%
Where alert is set to alert on percent < 20%
I've also seen different behaviour than the above from RedHat where the mount didn't work (e.g. /var) but adding the dev device did.
I don't think this is a problem with RMA seems more like someone is using the HD idea of disk and the other the OS idea of disk.
UNC free space calculation
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Actually, RMA uses standard function statfs() to retrieve free space information. What exact free space parameter do you check: free space for current user or the total free space?
Regards,
Max
Regards,
Max
Last edited by KS-Soft Europe on Mon Nov 26, 2007 7:54 am, edited 1 time in total.
Code is pretty simple
Regards
Alex
Code: Select all
struct statfs statbuf;
if (statfs(path, &statbuf)==0)
{
total = (int64)(statbuf.f_blocks) * statbuf.f_bsize;
free = (int64)(statbuf.f_bfree) * statbuf.f_bsize;
freeforuser = (int64)(statbuf.f_bavail) * statbuf.f_bsize;
return True;
}
else return False;
Alex