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

psutil.disk_usage returning same values for all partitions #686

Closed
vitorluis opened this issue Sep 22, 2015 · 3 comments
Closed

psutil.disk_usage returning same values for all partitions #686

vitorluis opened this issue Sep 22, 2015 · 3 comments

Comments

@vitorluis
Copy link

Hi all,

i'm writing a application, that read some hardware data, and one of them is the partitions data.

So, when i execute the psutil.disk_partitions i get all the partitions, and that's OK.

But when i execute the psutil.disk_usage('mount_point'), all partitions return the same free, used and total values.

Follow, two screenshots to show this situation:
home

And

usr

Both partitions are XFS filesystem, but my '/' partition are EXT4 and also return this values. And i don't if is a problem, i running the psutil function in a new Thread.

To complement, i'm using Ubuntu 15.04.

@giampaolo
Copy link
Owner

I'm not sure I understand. Are you complaining that 2 different paths return the same values?
That is expected behavior in case the 2 paths belong to the same mountpoint.
For example on my Linux box / and /tmp return the same values because /tmp is mounted under /.

@vitorluis
Copy link
Author

Yes, 2 different paths are returning the same values.

But, as you can see on the screenshot, the mount point /home is pointing to /dev/sda3. And the other mount point /usr is pointing to /dev/sda6.

So, does not have 2 mount points, pointing to the same partition.

@vitorluis
Copy link
Author

Oh man, i'm realized that i passing the device path, not the mounting point. So sorry about that :(

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