Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disk_usage reports wrong info with fstype = afpfs #735

Closed
mannibis opened this issue Jan 21, 2016 · 1 comment
Closed

disk_usage reports wrong info with fstype = afpfs #735

mannibis opened this issue Jan 21, 2016 · 1 comment

Comments

@mannibis
Copy link

Running OSX Mavericks and Python 2.7.11

"df - h" reports:

Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
//admin@qnappro/Public 22Ti 13Ti 8.3Ti 62% 3566069303 2228848228 62% /mnt/QNAP/Public

"psutil.disk_usage('/mnt/QNAP/Public')" reports:

sdiskusage(total=6143796170752, used=-2980872609792, free=9124668780544, percent=-48.5)

The fstype is afpfs. Any ideas? The only correct stat is the Free space

disk_partitions reports:
sdiskpart(device='//admin@qnappro/Public', mountpoint='/mnt/QNAP/Public', fstype='afpfs', opts='rw,nosuid,dovolfs,dontbrowse,automounted,multilabel')

@giampaolo
Copy link
Owner

Glances says this is a psutil issue, I say this is a Python issue, Python would probably say this is an OSX or POSIX issue, because disk_usage function relies entirely on os.statvfs. =)

You will probably discover that also shutil.disk_usage has the same issue because it was contributed back from psutil project. In summary, it looks like statvfs implementation for afpfs filesystems on OSX is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants