As its name indicates, IOTop is a Top-like utility but for disk IO. It shows a constantly updating list of processes, sorted by the amount of disk IO (read or write) they are performing. I find it extremely useful to find out quickly which process is causing the disk to grind noisily 🙂
Installing is easy:
$ sudo apt install iotop
To view all the processes, sorted by disk IO:
$ sudo iotop
To view only the processes that are actually doing any disk reads or writes:
Storage devices like hard disks, SSD drives, CD/DVD disks, SD cards and USB thumdrives can be plugged into a Linux computer. For many operations, we need to know the name of the storage device. For example, /dev/sda. Partitions created on this device to store data will have characters suffixed to this device name. For example, /dev/sda7 might be a partition on the /dev/sda hard disk.
I like to find out the device name of storage devices by listing them out using fdisk:
$ sudo fdisk -l
For each storage device, this lists the device name (named after Disk) followed by information about it and its partitions.
The df command lists the mounted partitions on the computer:
$ df -h
You will have to guess the name of the storage device from the partition name by removing a few characters of suffix. For example, partitions on a SD card named /dev/mmcblk0 might be named as /dev/mmcblk0p1 and /dev/mmcblk0p2.
Using GNOME Disk
The GNOME Disk utility is typically pre-installed on Ubuntu. It can be invoked from the Dash using its name Disks or from the shell as gnome-disks. It shows all the attached storage devices and their name is listed under Device.
Some people suggest listing the disk class of devices from the lshw command:
$ sudo lshw -class disk
I do not prefer this since it does not list SD cards and many such storage devices.