Dezdan

Member
Jan 28, 2013
23
1
3
cPanel Access Level
Root Administrator
Is there a for sure way to tell if my VM is running an HDD or SSD? I want to make sure my provider isn't hosing me and I want to tune my VM.

I know I can run:
Code:
[[email protected] ~]# cat /sys/block/sda/queue/rotational
And that should return 1 for HDD and 0 for SSD, though that might not always work on a VM. Are their any other methods that will work on a VM?
 

kernow

Well-Known Member
Jul 23, 2004
970
35
178
cPanel Access Level
Root Administrator
I can only think of a speed test, run the below commands, the answer should appear really quickly like < 2seconds if drives are SSD if not around 10 sec.
Code:
time for i in `seq 1 1000`; do
>     dd bs=4k if=/dev/sda count=1 skip=$(( $RANDOM * 128 )) >/dev/null 2>&1;
> done