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_partitions(): add disk type info (ssd / rotational) #2006

Open
giampaolo opened this issue Oct 26, 2021 · 1 comment
Open

disk_partitions(): add disk type info (ssd / rotational) #2006

giampaolo opened this issue Oct 26, 2021 · 1 comment

Comments

@giampaolo
Copy link
Owner

Summary

  • OS: all
  • Type: new-api

Description

An extra "disktype" field could be added to the retuned namedtuple indicating whether the partition refers to an SSD or a rotational disk drive.

The value should be a string like "ssd", "rotational" or "" / None (undefined).

This new value could be particularly useful to identify (and filter for) real disks/partitions, because the result returned by disk_partitions() is unclear on what's "real" and what's "virtual".

Here's another use case:
https://stackoverflow.com/questions/30647758/in-python-can-i-see-if-a-file-lives-on-an-hd-or-an-ssd)

@giampaolo
Copy link
Owner Author

Also, #1681 / #1694 must be taken into account. Should psutil.disk_swaps() also return this new field?

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

No branches or pull requests

1 participant