Calculating disc quotas

L

lujoplujop

Someone knows how windows calculate quotas?

I have made an ASP script that uses fsutil to retrive all the files of
one user on a disk. Then I get the size of the files and I show the
results to the user.
The problem is that the size that I calculate is not the same that
windows quota calculate.

I have tried to use file sizes, to use real disk space (round the file
sizes to 4K), and another strategies.
But I don't find what's the strategy of windows. I have made this
tests:

Deleting 1 file of 145 bytes --> Quota -1K
Deleting 1 file of 39871 bytes --> Quota -41K
Deleting 1 file of 8833 bytes --> Quota -13K
Deleting 1 file of 0 bytes --> Quota -0
Deleting 1 file of 349427 bytes --> Quota -346K
Deleting 1 file of 2277376 bytes --> Quota -2226K

Someone fine some logic in the calculations?

PD: Block size of my machine is 4K
 
G

Guest

Hi, I need to know path and size for files in they quota size. Can you give
me tips about your asp ore publish it. Thank you, it be very usefull because
the users say that they dont have any files in a share volume and we are
having space problems.
 
L

lujoplujop

I use fsutil file findbysid user unit to get the files.
Then I parse it calculating the space of each file. But I haven't found
the exact way that windows calculates quota. My best results are
rounding each file size to cluster size (normally 4096).

Cheers,
 
G

Guest

Hi, I am interested to know more about how you obtain the location of a users
files on a disk. Can you provide full details, i.e. the exact code I should
be using, I will test this and let you know what I come up with in order to
try and help you resolve your calculations.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top