Linux 101 : Disks usage and performance, and the swap space - fd, swapon, hdparm, ...

We could use the below command to change hard drives parameters and also view their performance:

-t : gives us the times for the hard drive read operations
-T : gives us the times for the hard drive read operations from the cache, the results are related to the buffer without accessing the hard drive.

The lsblk tool:

The lsblk tool gives us information about block devices.
Block devices allow reading or writing in blocks, like hard drives for example:

Listing mount points with "df":

We could use the "df" utility to list the mountpoints on a system:

For more readable output, we could use the "-h" option:

To also see the type of the filesystem, we use the "-T" option: 

Displaying the swap partition:

The swap space is used as a "helper" for the RAM, when it gets full.
To display the swap space (partition), we use the below command:

PRIO : the highest priority swap space is used first for the swap pages.


Leave as a comment: