You'll see the term "I/O" or "IO" thrown around a lot. All it means is "Input/Output" and it generally refers to the process of putting data into or onto something or taking data from somewhere or off of something.
When we're talking about network interfaces I/O would mean the packets coming in (I) and the packets going out (O). With disks, it means bytes being written to (I) the disk and bytes being read (O) from the disk.
iostat is called
stat: input/output statistics. Let's run
1 2 3 4 5 6 7 8 9 10 11 12
It's funny how
iostat also give us the CPU load average because a CPU is an I/O device. We'll ignore this though, as we've covered load averages previously.
Now we have rows representing the disks on this system. I only have one inside of this VM:
xvda. We can safely ignore the
Let's look at each column, above:
tps- transfers per second
kB_read/s- Kilobytes (
b= bits) read from the device, per second
kB_wrtn/s- Kilobytes (
b= bits) written to the device, per second
kB_dscd/s- Kilobytes (
b= bits) disgarded, per second
kB_read- Kilobytes (
b= bits) read from the device, total (since monitoring started)
kB_wrtn- Kilobytes (
b= bits) written to the device, total
kB_dscd- - Kilobytes (
b= bits) disgarded, total
So, we can see my primary device,
xvda, is very idle. There are hardly any transactions per second, hardly anything being read from or written to the device at this moment in time. Let's change that by faking some disk activity.
I've generated a 20GiB file and then used
rsync to transfer the file from one part of the disk to another part of the same disk (basically within the same file system on the disk):
Now we can see
665 transactions per second and we're writing
83,916 KiB per second. We're also reading it heavily too. This demonstrates the disk being heavily utilised. If I take a second snapshot moment later, I can see it's still being heavily utilised:'
This time I ran
iostat with the
-m flag so that it converted kilobytes (KB) to megabytes (MB). We're writing at a rate of
81.95 megabytes per second. That's pretty slow for a disk, but it's actually being limited by the underlaying provider: AWS Lightsail. They've me a limited amount of disk throughput to protect their infrastructure (and extract more money from me!)
That's a basically look at how measuring disk utilisation works. Simple.
Now we're going to move on to SSH: configuring it and using it.