jDiskMark / jdm-java

1 stars 0 forks source link

Invalid disk usage on windows 10 #17

Closed henrydarger1 closed 8 months ago

henrydarger1 commented 9 months ago

Usage is displaying 0% used on my windows 10 box. bug_in_jdm_usage

jamesmarkchan commented 9 months ago

@henrydarger1 can you try these two commands in a regular command prompt?

C:\Users\james\NetBeansProjects\jdm-java>cmd.exe /c fsutil volume diskfree c:\Users\james
Total free bytes                :  50,872,389,632 ( 47.4 GB)
Total bytes                     : 511,324,794,880 (476.2 GB)
Total quota free bytes          :  50,872,389,632 ( 47.4 GB)
Unavailable pool bytes          :               0 (  0.0 KB)
Quota unavailable pool bytes    :               0 (  0.0 KB)
Used bytes                      : 460,420,579,328 (428.8 GB)
Total Reserved bytes            :      31,825,920 ( 30.4 MB)
Volume storage reserved bytes   :               0 (  0.0 KB)
Available committed bytes       :               0 (  0.0 KB)
Pool available bytes            :               0 (  0.0 KB)

C:\Users\james\NetBeansProjects\jdm-java>fsutil volume diskfree c:\Users\james
Total free bytes                :  50,871,705,600 ( 47.4 GB)
Total bytes                     : 511,324,794,880 (476.2 GB)
Total quota free bytes          :  50,871,705,600 ( 47.4 GB)
Unavailable pool bytes          :               0 (  0.0 KB)
Quota unavailable pool bytes    :               0 (  0.0 KB)
Used bytes                      : 460,421,263,360 (428.8 GB)
Total Reserved bytes            :      31,825,920 ( 30.4 MB)
Volume storage reserved bytes   :               0 (  0.0 KB)
Available committed bytes       :               0 (  0.0 KB)
Pool available bytes            :               0 (  0.0 KB)

and then attach the output in a comment? This might tell us why it's not working in your windows 10 environment.

jamesmarkchan commented 9 months ago

@henrydarger1 found a windows 10 system and I think I know the issue:

C:\Users\ho625b>fsutil volume diskfree c:\Users\ho625b
Total free bytes        : 240,623,628,288 (224.1 GB)
Total bytes             : 510,821,445,632 (475.7 GB)
Total quota free bytes  : 240,623,628,288 (224.1 GB)

C:\Users\ho625b>cmd.exe /c fsutil volume diskfree c:\Users\ho625b
Total free bytes        : 240,623,398,912 (224.1 GB)
Total bytes             : 510,821,445,632 (475.7 GB)
Total quota free bytes  : 240,623,398,912 (224.1 GB)

the command operates differently on windows 10.

jamesmarkchan commented 9 months ago

usage reporting should be fixed on windows 10 now @henrydarger1 w10-usage-fix here is the reproduction on a windows 10 system: reproduction-v0 5-w10