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

Determine if disk partitions are SSD or HDD #32

Closed
CodyCBakerPhD opened this issue Mar 4, 2024 · 0 comments
Closed

Determine if disk partitions are SSD or HDD #32

CodyCBakerPhD opened this issue Mar 4, 2024 · 0 comments

Comments

@CodyCBakerPhD
Copy link
Collaborator

From qualitative experience, this can make a big different in various performances when interacting with disk (including streaming with a cache)

No native ability in psutil surprisingly

Some digging revealed these platform-specific methods

Unix

cat /sys/block/sda/queue/rotational

or

cat /sys/block/sdb/queue/rotational

Windows

get-physicaldisk | format-table -autosize

which dumps out text like so

Number FriendlyName           SerialNumber    MediaType CanPool OperationalStatus HealthStatus Usage            Size
------ ------------           ------------    --------- ------- ----------------- ------------ -----            ----
4      WD Elements 25A3       5QJLPH7B        HDD       False   OK                Healthy      Auto-Select  10.91 TB
0      WDC WDS240G2G0A-00JH30 190825478511    SSD       False   OK                Healthy      Auto-Select 223.58 GB
1      WDC WD10EZEX-08WN4A0   WD-WCC6Y1EPL8DP HDD       False   OK                Healthy      Auto-Select 931.51 GB
3      WD Elements 25A3       3ZH460AZ        HDD       False   OK                Healthy      Auto-Select  20.01 TB
2      WD Elements 2620       WX32E70356C4    HDD       False   OK                Healthy      Auto-Select   4.55 TB
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

1 participant