How to Check Disk usage Disk utilization on Linux

Updated: Feb 2

Disk usage and disk utilization are different on Linux. Disk usage means how much percent of space we use on the disk. Disk utilization means how busy the disk is when there is some workload on it. Today we will look at more details about this.


How to check disk usage on Linux?

df command can be used to show disk usage. We can get how much percent space we already used on this disk or disk partition from Use% column. If it is over 80%, we should check which file or directories take up this space. Then we can remove some unwanted files to release the space.

# df -h
Filesystem                    Size  Used Avail Use% Mounted on
devtmpfs                       16G     0   16G   0% /dev
tmpfs                          16G  1.7G   14G  11% /dev/shm
tmpfs                          16G  834M   15G   6% /run
tmpfs                          16G     0   16G   0% /sys/fs/cgroup
/dev/mapper/wbx_vg-root        20G  1.8G   18G   9% /
/dev/mapper/wbx_vg-opt        9.8G  217M  9.6G   3% /opt
/dev/mapper/wbx_vg-tmp        4.9G   45M  4.9G   1% /tmp
/dev/mapper/wbx_vg-u00         43G   20G   24G  46% /u00
/dev/mapper/wbx_vg-var        9.8G  757M  9.1G   8% /var
/dev/mapper/wbx_vg-var_crash   33G   39M   33G   1% /var/crash
/dev/sdo1                     509M  159M  350M  32% /boot



How to check disk utilization on Linux?

Iostat command can be used to show disk utilization. We can get how busy our disk is when there is some workload on it from column %util. If it is over 80%, we need check the workload like iops, io size or storage latency to fix it. More details here about disk utilization.

# iostat -kx 3  /dev/sdo 
Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdo               0.06     0.78    1.62   13.27    98.69   177.04    37.04     0.50   33.48   72.83   28.68   4.21   6.27
Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdo               0.00     0.00    0.00   12.00     0.00    82.50    13.75     0.18   15.22    0.00   15.22   4.56   5.47

Related Post:

No space left on device on Linux


252 views

Join our newsletter. Get a free Linux account on Cloud.

Get a Free Cloud Server! 

We can use this cloud server to practice Linux commands. Never miss a post!

Thanks for submitting!