centos – how to check if the IO was hanging

Are there any method I could use in centos to check if the block device under the IO was hanged?

I tried to check the /proc/diskstats, but it is not obvious enough to show if there is an hang there.

Every 1.0s: cat  /proc/diskstats|grep -e sd[d-g]1|grep -v grep                                                                                                            Mon Oct 16 18:47:30 2023

   8      49 sdd1 95 0 8280 1321 2124398 0 36124208 170770132 26 7075210 170772307
   8      65 sde1 72 0 6216 86 2108682 0 35877742 171304646 22 7075089 171305499
   8      81 sdf1 72 0 6216 98 2144945 0 36461010 172851233 31 7075100 172851938
   8      97 sdg1 72 0 6216 139 2122094 0 36087992 173085284 18 7075148 173086101

Read more here: Source link